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

struct A
{
  int i = 42;
  int j = f();
  int k = this->f();
  int f() { return i++; }
};

A a;

int main()
{
  if (a.j != 42 || a.k != 43 || a.i != 44)
    __builtin_abort();
}