summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/special/conpr-1.C
blob: ef694dbe6f8df1095003b38886224244bda72ac0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/* { dg-do run { target init_priority } } */

#include <stdlib.h>

class foo_t {
    int x;
public:
    foo_t(void) { x=1; }
    int get(void) { return x; }
};

static foo_t foo __attribute__((init_priority(5000)));

int main(void) {

    if (foo.get())
        exit(0);
    else
        abort();
}