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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.dg/] [nrv2.c] - Rev 867

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

/* Test that the tree_nrv pass works by making sure that we don't generate
   a memcpy.  Throw in a bit of control flow to make its job a bit harder.  */
 
/* { dg-options "-O" } */
 
struct A { int i[100]; };
 
int b;
 
struct A f ()
{
  struct A a;
  if (b)
    {
      a.i[0] = 42;
      return a;
    }
  else
    {
      a.i[42] = 1;
      return a;
    }
}
 
/* { dg-final { scan-assembler-not "memcpy" } } */
 

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

powered by: WebSVN 2.1.0

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