https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105972
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org Priority|P4 |P2 --- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> --- This ICEs also on the valid __attribute__((optimize(0))) int foo () { int bar (x) int x; { return x; } return bar (0); } with -O2 -g. If I comment out the optimize attribute, then with -O2 -g -fdump-tree-gimple-lineno one can see: [pr105972-2.c:5:3] # DEBUG BEGIN_STMT [pr105972-2.c:7:5] # DEBUG BEGIN_STMT [pr105972-2.c:11:3] # DEBUG BEGIN_STMT statements in foo and [pr105972-2.c:9:5] # DEBUG BEGIN_STMT in bar. The line 7 statement is just incorrect, IMHO shouldn't be added at all, when parsing the K&R parameter declarations, there is no reasonable code point to emit those. For normal K&R functions, they aren't just emitted because