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

Subversion Repositories scarts

[/] [scarts/] [trunk/] [toolchain/] [scarts-gcc/] [gcc-4.1.1/] [gcc/] [testsuite/] [g++.dg/] [other/] [static11.C] - Blame information for rev 12

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 12 jlechner
// 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.