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++.mike/] [init1.C] - Blame information for rev 338

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 305 jeremybenn
// The VxWorks kernel has no implementation of atexit, so local statics
2
// are never destroyed.
3
// { dg-do run { xfail vxworks_kernel } }
4
int count;
5
 
6
extern "C" void _exit(int);
7
 
8
struct C {
9
  ~C() { if (count != 1) _exit(1); }
10
} c;
11
 
12
class A {
13
public:
14
  ~A () { ++count; }
15
};
16
 
17
void f() {
18
  static A a;
19
}
20
 
21
void g() {
22
  // Since this isn't constructed, we can't destruct it.
23
  static A a;
24
}
25
 
26
int main () {
27
  f();
28
}

powered by: WebSVN 2.1.0

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