comparison gcc/testsuite/g++.dg/cpp2a/constexpr-union1.C @ 152:2b5abeee2509

update gcc11
author anatofuz
date Mon, 25 May 2020 07:50:57 +0900
parents
children
comparison
equal deleted inserted replaced
145:1830386684a0 152:2b5abeee2509
1 // { dg-do compile { target c++20 } }
2
3 union U
4 {
5 int x;
6 char y;
7 };
8
9 constexpr bool
10 baz ()
11 {
12 U u;
13 u.x = 3;
14 u.y = 7;
15 return (u.y == 7);
16 }
17
18 static_assert (baz ());