gcc/testsuite/g++.dg/template/non-dependent7.C
raw| 1 | // { dg-do compile } |
| 2 | |
| 3 | // Origin: Giovanni Bajo <[email protected]> |
| 4 | |
| 5 | // PR c++/13092: ICE taking address of member which is non-dependent |
| 6 | |
| 7 | struct S |
| 8 | { |
| 9 | int i; |
| 10 | }; |
| 11 | |
| 12 | template<int S::*p> |
| 13 | struct X |
| 14 | {}; |
| 15 | |
| 16 | template <class T> |
| 17 | struct Foo |
| 18 | { |
| 19 | X<&S::i> x; |
| 20 | }; |
| 21 | |
| 22 | template struct Foo<void>; |