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

            Bug ID: 92799
           Summary: ICE: in get, at cgraph.h:1339
           Product: gcc
           Version: 10.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: anbu1024.me at gmail dot com
  Target Milestone: ---

$ cat test.c 

static void __attribute__ ( ( weakref ( "bar" ) ) ) foo ( void ) { } 

extern void foo ( void ) ;

--------------------------------------------------------------------------------

$ gcc-snapshot10 --version
gcc (GCC) 10.0.0 20191201 (experimental)
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

--------------------------------------------------------------------------------

$ gcc-snapshot10 test.c 
test.c:2:53: internal compiler error: in get, at cgraph.h:1339
    2 | static void __attribute__ ( ( weakref ( "bar" ) ) ) foo ( void ) { }
      |                                                     ^~~
0x618bad cgraph_node::get(tree_node const*)
        ../../gcc-10-20191201/gcc/cgraph.h:1339
0x619c7a cgraph_node::get(tree_node const*)
        ../../gcc-10-20191201/gcc/tree.h:3387
0x619c7a cgraph_node::analyze()
        ../../gcc-10-20191201/gcc/cgraphunit.c:622
0x9268ef analyze_functions
        ../../gcc-10-20191201/gcc/cgraphunit.c:1212
0x9274a2 symbol_table::finalize_compilation_unit()
        ../../gcc-10-20191201/gcc/cgraphunit.c:2925
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.

--------------------------------------------------------------------------------

$ gcc-snapshot9 --version
gcc (GCC) 9.2.1 20191123
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

--------------------------------------------------------------------------------

$ gcc-snapshot9 test.c 
test.c:2:53: internal compiler error: Segmentation fault
    2 | static void __attribute__ ( ( weakref ( "bar" ) ) ) foo ( void ) { }
      |                                                     ^~~
0xa8c89f crash_signal
        ../../gcc-9-20191123/gcc/toplev.c:326
0x71f7c2 cgraph_node* dyn_cast<cgraph_node*, symtab_node>(symtab_node*)
        ../../gcc-9-20191123/gcc/is-a.h:227
0x71f7c2 cgraph_node::get(tree_node const*)
        ../../gcc-9-20191123/gcc/cgraph.h:1339
0x71f7c2 cgraph_node::analyze()
        ../../gcc-9-20191123/gcc/cgraphunit.c:640
0x721e77 analyze_functions
        ../../gcc-9-20191123/gcc/cgraphunit.c:1126
0x722a62 symbol_table::finalize_compilation_unit()
        ../../gcc-9-20191123/gcc/cgraphunit.c:2837
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.

Reply via email to