summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp0x/constexpr-static4.C
blob: 8189fc5de479679fcc433a835d286d7e0fee0d28 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// { dg-options -std=c++0x }
// { dg-do run }

extern "C" void abort ();
extern int ar[2];

int f()
{
  if (ar[0] != 42 || ar[1] != 0)
    abort ();
  return 1;
}

int i = f();

int ar[2] = { 42, i };

int main()
{
}