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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.2.2/] [gcc/] [testsuite/] [g++.old-deja/] [g++.other/] [static16.C] - Diff between revs 149 and 154

Go to most recent revision | Only display areas with differences | Details | Blame | View Log

Rev 149 Rev 154
// { dg-do run  }
// { dg-do run  }
// Test that we properly evaluate the object parameter when accessing static
// Test that we properly evaluate the object parameter when accessing static
// members.
// members.
struct A {
struct A {
  static void f () {}
  static void f () {}
  static int i;
  static int i;
};
};
int A::i;
int A::i;
int c = 0;
int c = 0;
A g ()
A g ()
{
{
  ++c;
  ++c;
  return A();
  return A();
}
}
int main ()
int main ()
{
{
  g().f();
  g().f();
  g().i = 42;
  g().i = 42;
  return (c != 2);
  return (c != 2);
}
}
 
 

powered by: WebSVN 2.1.0

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