[PR c++/84702] ICE with default tmpl arg of overload set
[official-gcc.git] / gcc / testsuite / g++.dg / ext / underlying_type7.C
blob2d6ec51792c8760dd087eb34a382d46c9bf876b3
1 // { dg-do compile { target c++11 } }
3 enum E1 : unsigned { E1_en = 1 };
4 enum E2 : char { E2_en = 1 };
5 enum class E3 { a = -1 };
6 enum class E4 : unsigned char { c = 1 };
7 enum class E5 : int { a = -1, b = 1 };
8 enum class E6 : long { c = __LONG_MAX__ };
10 template<typename T>
11   void
12   test(T, __underlying_type(T)) // { dg-message "sorry, unimplemented: mangling" }
13   { }
15 int main()
17   test(E1::E1_en, 1);
18   test(E2::E2_en, 1);
19   test(E3::a, -1);
20   test(E4::c, 1);
21   test(E5::a, -1);
22   test(E6::c, __LONG_MAX__);