gcc/testsuite/g++.dg/modules/enum-7.C
raw| 1 | // { dg-additional-options -fmodules-ts } |
| 2 | |
| 3 | // ICE getting template info of a function-scope enum |
| 4 | |
| 5 | template <typename T> void adl (T) {} |
| 6 | |
| 7 | template <typename T> |
| 8 | void frob (T arg) |
| 9 | { |
| 10 | enum class case_conv {none}; |
| 11 | |
| 12 | case_conv x = case_conv::none; |
| 13 | |
| 14 | adl (x); |
| 15 | } |
| 16 | |
| 17 | void foo () |
| 18 | { |
| 19 | frob (1); |
| 20 | } |