Daily bump.
[gcc.git] / gcc / testsuite / g++.dg / warn / pr94038-2.C
bloba468cc055ebf6343a713f450a1eb81e7c8356c7e
1 // PR c++/94038
2 // { dg-do compile { target c++11 } }
3 // { dg-additional-options "-O -Wall" }
5 static constexpr int x = 0;
7 template<typename T>
8 constexpr const int&
9 foo()
11   static_assert(T(1) == 0, "");
12   return x;
15 template<typename T>
16 constexpr const int&
17 bar()
19   return foo<T>();
22 constexpr int
23 baz(int a)
25   return a;
28 static_assert(decltype(baz(bar<int>())){} == 0, "");