gcc/testsuite/g++.dg/template/crash124.C
raw| 1 | // PR c++/50436 |
| 2 | |
| 3 | template <bool> struct VI {}; |
| 4 | template <typename T> |
| 5 | struct IP |
| 6 | { |
| 7 | static const bool r = IP<T*>::r; // { dg-error "depth" } |
| 8 | }; |
| 9 | template <typename T> |
| 10 | struct V |
| 11 | { |
| 12 | static const bool r = IP<T*>::r; |
| 13 | VI<r> vi; |
| 14 | }; |
| 15 | struct X; |
| 16 | struct Y |
| 17 | { |
| 18 | V<X> v; // { dg-message "from here" } |
| 19 | } |
| 20 | |
| 21 | // { dg-prune-output "compilation terminated" } |