Sign in
gnu
/
gcc
/
refs/tags/basepoints/gcc-13
/
.
/
gcc
/
testsuite
/
g++.dg
/
cpp2a
/
constexpr-union1.C
blob: ac8aa5f669cb8c7cdee9237b8356488818cc3f87 [
file
] [
log
] [
blame
]
// { dg-do compile { target c++20 } }
union
U
{
int
x
;
char
y
;
};
constexpr
bool
baz
()
{
U u
;
u
.
x
=
3
;
u
.
y
=
7
;
return
(
u
.
y
==
7
);
}
static_assert
(
baz
());