aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/initlist86.C
blob: ace2ef928710fb38a8e1bf1ef3b1988bb97fea83 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// PR c++/61382
// { dg-do run { target c++11 } }

struct A
{
  int i,j;
  A(int i,int j):i(i),j(j){}
};

extern "C" int printf (const char *, ...);

int main()
{
  int i = 0;
  A a{i++,i++};
  if (a.i != 0 || a.j != 1)
    __builtin_abort();
}