comparison gcc/testsuite/g++.dg/cpp0x/pr83556.C @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents
children
comparison
equal deleted inserted replaced
111:04ced10e8804 131:84e7813d76e9
1 // PR c++/83556
2 // { dg-do run { target c++11 } }
3
4 int
5 foo ()
6 {
7 return 1;
8 }
9
10 struct A
11 {
12 int a = foo ();
13 int b = 1;
14 int c = a ? 1 * b : 2 * b;
15 };
16
17 struct B
18 {
19 A d {};
20 };
21
22 int
23 main ()
24 {
25 B e {};
26 if (e.d.c != 1)
27 __builtin_abort ();
28 }