[C++ PATCH] Deprecate -ffriend-injection
[official-gcc.git] / gcc / testsuite / g++.dg / diagnostic / inhibit-warn-1.C
blob5655eb44fd312913fb38950df664dc3200cb74e0
1 // PR c++/65882
2 // { dg-do compile { target c++11 } }
3 // { dg-options "-Wbool-compare" }
5 // Check that we don't ICE because of reentering error reporting routines while
6 // evaluating template parameters
8 template<typename>
9 struct type_function {
10   static constexpr bool value = false;
13 template<bool>
14 struct dependent_type {
15   typedef int type;
18 template<typename T>
19 typename dependent_type<(5 > type_function<T>::value)>::type
20 bar();
22 template<typename T>
23 typename dependent_type<(5 > type_function<T>::value)>::type
24 foo()
26   return bar<int>();
29 int main()
31   foo<int>();