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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [g++.dg/] [opt/] [nrv1.C] - Diff between revs 154 and 816

Only display areas with differences | Details | Blame | View Log

Rev 154 Rev 816
// Test for the named return value optimization.
// Test for the named return value optimization.
// { dg-do run }
// { dg-do run }
// { dg-options -fno-inline }
// { dg-options -fno-inline }
int c;
int c;
int d;
int d;
struct A
struct A
{
{
  A() { ++c; }
  A() { ++c; }
  A(const A&) { ++c; };
  A(const A&) { ++c; };
  ~A() { ++d; }
  ~A() { ++d; }
};
};
inline A f ()
inline A f ()
{
{
  A a;
  A a;
  return a;
  return a;
}
}
int main ()
int main ()
{
{
  {
  {
    A a = f ();
    A a = f ();
  }
  }
  return !(c == 1 && c == d);
  return !(c == 1 && c == d);
}
}
 
 

powered by: WebSVN 2.1.0

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