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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [g++.dg/] [other/] [static11.C] - Blame information for rev 315

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 301 jeremybenn
// This is a copy of g++.old-deja/g++.pt/static11.C which at one
2
// time got a SEGV for mmix-knuth-mmixware when compiled with
3
// -da (or either -dj or -df).
4
// { dg-do compile }
5
// { dg-options "-da" }
6
 
7
extern "C" void _exit (int);
8
 
9
int r = 1;
10
 
11
struct A
12
{
13
  void f(){};
14
  A(){ ++r; }
15
  ~A(){ r -= 2; _exit (r); }
16
};
17
 
18
template
19
struct C
20
{
21
  C(){ a.f(); }
22
  static A a;
23
};
24
 
25
template  A C::a;
26
typedef C B;
27
 
28
int main()
29
{
30
  C c;
31
  return r;
32
}
33
 
34
// { 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.