https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67330

Markus Trippelsdorf <trippels at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2015-08-23
                 CC|                            |hubicka at gcc dot gnu.org
     Ever confirmed|0                           |1

--- Comment #2 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
Doesn't happen with --enable-checking=release.

markus@x4 tmp % cat core.i
void fn1 (void)
{
  __attribute__ ((weak)) int a;
}
markus@x4 tmp % gcc -c core.i
core.i: In function ‘fn1’:
core.i:3:30: error: weak declaration of ‘a’ must be public
   __attribute__ ((weak)) int a;
                              ^

markus@x4 tmp % /var/tmp/gcc_test/usr/local/bin/gcc -c core.i
core.i: In function ‘fn1’:
core.i:3:3: internal compiler error: in get, at cgraph.h:371
   __attribute__ ((weak)) int a;
   ^
0x62f80c symtab_node::get(tree_node const*)
        ../../gcc/gcc/cgraph.h:368
0x62f80c handle_weak_attribute
        ../../gcc/gcc/c-family/c-common.c:8332
0x5a966a decl_attributes(tree_node**, tree_node*, int)
        ../../gcc/gcc/attribs.c:557
0x5c5674 start_decl(c_declarator*, c_declspecs*, bool, tree_node*)
        ../../gcc/gcc/c/c-decl.c:4547
0x6174e0 c_parser_declaration_or_fndef
        ../../gcc/gcc/c/c-parser.c:1830
0x61bb2d c_parser_compound_statement_nostart
        ../../gcc/gcc/c/c-parser.c:4622
0x61bf9e c_parser_compound_statement
        ../../gcc/gcc/c/c-parser.c:4533
0x617f88 c_parser_declaration_or_fndef
        ../../gcc/gcc/c/c-parser.c:1966
0x622107 c_parser_external_declaration
        ../../gcc/gcc/c/c-parser.c:1436
0x6229c9 c_parser_translation_unit
        ../../gcc/gcc/c/c-parser.c:1323
0x6229c9 c_parse_file()
        ../../gcc/gcc/c/c-parser.c:15449
0x67e642 c_common_parse_file()
        ../../gcc/gcc/c-family/c-opts.c:1058
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.

Reply via email to