gcc/testsuite/gcc.dg/pr104506-1.c
raw| 1 | /* { dg-do compile } */ |
| 2 | /* { dg-options "-std=gnu11" } */ |
| 3 | /* PR c/104506: we used to ICE after the error of |
| 4 | changing the type. */ |
| 5 | |
| 6 | void |
| 7 | foo (double x) |
| 8 | /* { dg-message "note: previous definition" "previous definition" { target *-*-* } .-1 } */ |
| 9 | { |
| 10 | (void)x; |
| 11 | int x; /* { dg-error "redeclared as different kind of symbol" } */ |
| 12 | } |