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

Subversion Repositories scarts

[/] [scarts/] [trunk/] [toolchain/] [scarts-gcc/] [gcc-4.1.1/] [gcc/] [testsuite/] [gcc.dg/] [nrv2.c] - Blame information for rev 12

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 12 jlechner
/* 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.