testsuite: Fix up pr111150* tests on i686-linux [PR111150]
[official-gcc.git] / gcc / testsuite / g++.dg / cpp1y / constexpr-80739.C
blob5bfa082866a76b998907ecaf97213e0ac2881855
1 // PR c++/80739
2 // { dg-do compile { target c++14 } }
4 using size_t = decltype(sizeof(0));
5 template <class T> struct element {
6     constexpr element() noexcept: x0(0), x1(0), x2(0), x3(0) {}
7     T x0; int x1, x2, x3;
8 };
9 template <class T> struct container {
10     constexpr container() noexcept: data() {data = element<T>();}
11     element<T> data;
13 template <class T> constexpr bool test() {
14     return (container<T>(), true);
16 int main() {
17     constexpr bool tmp0 = test<int>();
18     constexpr bool tmp1 = test<size_t>();
19     return tmp0 && tmp1;