summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/ext/construct1.C
blob: 6a7d8cee403058140274dc49246f4fe6b00ed83e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
// PR c++/16717
// { dg-options "-O2" }

int i;

void hello (void) __attribute__ ((constructor));
void hello (void) { i = 1; }

int main (void) {
  if (i != 1)
    return 1;
}