gcc/testsuite/g++.dg/parse/crash38.C
raw| 1 | /* PR c++/33207 */ |
| 2 | |
| 3 | /* This would not ICE. */ |
| 4 | namespace M { } /* { dg-message "previous declaration" } */ |
| 5 | struct M; /* { dg-error "redeclared as different kind of" } */ |
| 6 | M *p; /* { dg-error "does not name a type" } */ |
| 7 | |
| 8 | /* This would ICE when processing 'p'. */ |
| 9 | namespace N { } /* { dg-message "previous declaration" } */ |
| 10 | struct N; /* { dg-error "redeclared as different kind of" } */ |
| 11 | struct N* p; /* { dg-error "redeclared as different kind of" } */ |