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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [opt/] [nrv12.C] - Blame information for rev 693

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 693 jeremybenn
/* Verify that gimple-level NRV is occurring even for RESULT_DECLs.  */
2
/* { dg-do compile { target { { i?86-*-* x86_64-*-* } && ia32 } } } */
3
/* { dg-options "-O -fdump-tree-optimized" } */
4
 
5
struct P
6
{
7
  long long l;
8
  int a;
9
  unsigned int b;
10
  P(long long x) : l(x) {}
11
};
12
 
13
P foo (P);
14
P bar (P);
15
 
16
P foo (P x)
17
{
18
  P y = P (-1LL);
19
  y = bar (x);
20
  return y;
21
}
22
 
23
/* { dg-final { scan-tree-dump-times "return slot optimization" 1 "optimized" } } */
24
/* { dg-final { cleanup-tree-dump "optimized" } } */

powered by: WebSVN 2.1.0

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