aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/init/aggr13.C
blob: 08248a6df94656c03ca8b5267b84c372838f8814 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// PR c++/67550
// { dg-do run }

struct S {
  int x;
  int y;
};
int foo() { return 1; }

int main() {
  S const data[] = {{0, foo()}};

  S data2[] = {data[0]};

  if (!data2[0].y)
    __builtin_abort();
}