This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/31331] New: ICE on invalid function attribute syntax for main()
- From: "eweddington at cso dot atmel dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 23 Mar 2007 21:16:22 -0000
- Subject: [Bug c/31331] New: ICE on invalid function attribute syntax for main()
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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