Program: __attribute__ ((naked)) int main(void) { return 0; } Compiled with 4.1.1 for the AVR target:
Compiling C: test.c avr-gcc -c -mmcu=atmega128 -I. -gdwarf-2 -DF_CPU=8000000UL -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -Wall -Wstrict-prototypes -Wa,-adhlns=./test.lst -std=gnu99 -Wundef -MMD -MP -MF .dep/test.o.d test.c -o test.o test.c:2: internal compiler error: in start_function, at c-decl.c:6014 Please submit a full bug report, A program with the proper syntax, compiles without error: int main(void) __attribute__ ((naked)); int main(void) { return 0; } -- Summary: ICE on invalid function attribute syntax for main() Product: gcc Version: 4.1.1 Status: UNCONFIRMED Severity: minor Priority: P3 Component: c AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: eweddington at cso dot atmel dot com GCC build triplet: mingw GCC host triplet: mingw GCC target triplet: avr http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31331