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++.dg/] [other/] [static11.C] - Diff between revs 149 and 154

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

Rev 149 Rev 154
// This is a copy of g++.old-deja/g++.pt/static11.C which at one
// This is a copy of g++.old-deja/g++.pt/static11.C which at one
// time got a SEGV for mmix-knuth-mmixware when compiled with
// time got a SEGV for mmix-knuth-mmixware when compiled with
// -da (or either -dj or -df).
// -da (or either -dj or -df).
// { dg-do compile }
// { dg-do compile }
// { dg-options "-da" }
// { dg-options "-da" }
extern "C" void _exit (int);
extern "C" void _exit (int);
int r = 1;
int r = 1;
struct A
struct A
{
{
  void f(){};
  void f(){};
  A(){ ++r; }
  A(){ ++r; }
  ~A(){ r -= 2; _exit (r); }
  ~A(){ r -= 2; _exit (r); }
};
};
template
template
struct C
struct C
{
{
  C(){ a.f(); }
  C(){ a.f(); }
  static A a;
  static A a;
};
};
template  A C::a;
template  A C::a;
typedef C B;
typedef C B;
int main()
int main()
{
{
  C c;
  C c;
  return r;
  return r;
}
}
// { dg-final { cleanup-rtl-dump "*" } }
// { dg-final { cleanup-rtl-dump "*" } }
 
 

powered by: WebSVN 2.1.0

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