This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/49551] tentative declaration after definition and -fdata-sections cause ICE in C front-end.
- From: "bilbotheelffriend at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 29 Jan 2015 21:36:46 +0000
- Subject: [Bug target/49551] tentative declaration after definition and -fdata-sections cause ICE in C front-end.
- Auto-submitted: auto-generated
- References: <bug-49551-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=49551
Prathamesh <bilbotheelffriend at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |bilbotheelffriend at gmail dot com
--- Comment #3 from Prathamesh <bilbotheelffriend at gmail dot com> ---
It appears the issue is still present on trunk for arm-none-linux-gnueabihf.
Compiling the above code gives following ICE:
(arm-none-linux-gnueabihf-gcc -O -fdata-sections):
fo.c:2:1: internal compiler error: in get_variable_section, at varasm.c:1151
int x;
^
0xd1b9ab get_variable_section(tree_node*, bool)
/home/prathamesh.kulkarni/arm-gnu-toolchain/src/gcc.git~master/gcc/varasm.c:1150
0xd1ca81 get_block_for_decl
/home/prathamesh.kulkarni/arm-gnu-toolchain/src/gcc.git~master/gcc/varasm.c:1216
0xd1e50f make_decl_rtl(tree_node*)
/home/prathamesh.kulkarni/arm-gnu-toolchain/src/gcc.git~master/gcc/varasm.c:1346
0x5301fc duplicate_decls
/home/prathamesh.kulkarni/arm-gnu-toolchain/src/gcc.git~master/gcc/c/c-decl.c:2732
0x533400 pushdecl(tree_node*)
/home/prathamesh.kulkarni/arm-gnu-toolchain/src/gcc.git~master/gcc/c/c-decl.c:2888
0x5457d6 start_decl(c_declarator*, c_declspecs*, bool, tree_node*)
/home/prathamesh.kulkarni/arm-gnu-toolchain/src/gcc.git~master/gcc/c/c-decl.c:4626
0x595d7e c_parser_declaration_or_fndef
/home/prathamesh.kulkarni/arm-gnu-toolchain/src/gcc.git~master/gcc/c/c-parser.c:1846
0x5a07b8 c_parser_external_declaration
/home/prathamesh.kulkarni/arm-gnu-toolchain/src/gcc.git~master/gcc/c/c-parser.c:1452
0x5a1215 c_parser_translation_unit
/home/prathamesh.kulkarni/arm-gnu-toolchain/src/gcc.git~master/gcc/c/c-parser.c:1339
0x5a1215 c_parse_file()
/home/prathamesh.kulkarni/arm-gnu-toolchain/src/gcc.git~master/gcc/c/c-parser.c:15416
0x5fd622 c_common_parse_file()
/home/prathamesh.kulkarni/arm-gnu-toolchain/src/gcc.git~master/gcc/c-family/c-opts.c:1052
Thanks,
Prathamesh