URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Subversion Repositories openrisc
[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [opt/] [nrv8.C] - Rev 693
Compare with Previous | Blame | View Log
// PR optimization/19531// forbids NRV on volatile return value.// { dg-options -O2 }// { dg-do run }extern "C" { void abort(); }struct A{int d;A () { d = 123; }A (const A & o) { d = o.d; }A (volatile const A & o) { d = o.d + 2; }};A bar(){volatile A l;return l;}main(){A a = bar ();if (a.d != 125)abort();return 0;}
