URL
https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk
Subversion Repositories openrisc_me
[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [g++.dg/] [opt/] [nrv12.C] - Rev 478
Go to most recent revision | Compare with Previous | Blame | View Log
/* Verify that gimple-level NRV is occurring even for RESULT_DECLs. *./
/* { dg-do compile { target i?86-*-* x86_64-*-* } } */
/* { dg-options "-O -fdump-tree-optimized" } */
/* { dg-require-effective-target ilp32 } */
struct P
{
long long l;
int a;
unsigned int b;
P(long long x) : l(x) {}
};
P foo (P);
P bar (P);
P foo (P x)
{
P y = P (-1LL);
y = bar (x);
return y;
}
/* { dg-final { scan-tree-dump-times "return slot optimization" 1 "optimized" } } */
/* { dg-final { cleanup-tree-dump "optimized" } } */
Go to most recent revision | Compare with Previous | Blame | View Log