OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.dg/] [nrv2.c] - Blame information for rev 328

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 298 jeremybenn
/* Test that the tree_nrv pass works by making sure that we don't generate
2
   a memcpy.  Throw in a bit of control flow to make its job a bit harder.  */
3
 
4
/* { dg-options "-O" } */
5
 
6
struct A { int i[100]; };
7
 
8
int b;
9
 
10
struct A f ()
11
{
12
  struct A a;
13
  if (b)
14
    {
15
      a.i[0] = 42;
16
      return a;
17
    }
18
  else
19
    {
20
      a.i[42] = 1;
21
      return a;
22
    }
23
}
24
 
25
/* { dg-final { scan-assembler-not "memcpy" } } */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.