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

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc1/] [gcc/] [testsuite/] [g++.old-deja/] [g++.jason/] [static1.C] - Blame information for rev 338

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 305 jeremybenn
// { dg-do run  }
2
// PRMS id: 6863
3
 
4
extern "C" int printf(const char *, ...);
5
extern "C" void abort();
6
 
7
enum ENUM {E1=0, E2 };
8
int d;
9
 
10
class AAA{
11
public:
12
 AAA() {a = new char[10];printf("constructor AAA() called\n");}
13
 AAA(int) {printf("constructor AAA(int) called\n");}
14
 ~AAA(){ printf("destructor ~AAA() called\n"); d = 1; }
15
 operator int () { return 1;}
16
 char *a;
17
 int i;
18
};
19
 
20
struct sentinel {
21
  ~sentinel () { if (d == 0) abort (); }
22
} s;
23
 
24
/* forward decl here causes gcc not to execute ct and dt for arr1 */
25
extern AAA arr1[];
26
 
27
AAA arr1[] = {(int)E1 };
28
 
29
int main()
30
{
31
  return 0;
32
}

powered by: WebSVN 2.1.0

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