gcc/testsuite/g++.dg/pr79091.C
raw| 1 | // PR 79091 ICE mangling an unnamed enum in a tempate instantiation. |
| 2 | |
| 3 | enum { |
| 4 | One = 1 |
| 5 | }; |
| 6 | |
| 7 | template<int Options> |
| 8 | class Matrix {}; |
| 9 | |
| 10 | template<int Dim> |
| 11 | Matrix<Dim ? One : 0> *Bar () |
| 12 | { |
| 13 | return 0; |
| 14 | } |
| 15 | |
| 16 | template<int Opt> |
| 17 | Matrix<Opt> *Baz () |
| 18 | { |
| 19 | return 0; |
| 20 | } |
| 21 | |
| 22 | bool Foo () |
| 23 | { |
| 24 | return Baz<1> () == Bar<1> (); |
| 25 | } |