[Bug c++/102214] New: ICE when compiling local class with -fno-weak

fxue at os dot amperecomputing.com gcc-bugzilla@gcc.gnu.org
Mon Sep 6 09:23:55 GMT 2021


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

            Bug ID: 102214
           Summary: ICE when compiling local class with -fno-weak
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: fxue at os dot amperecomputing.com
  Target Milestone: ---

Created attachment 51413
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=51413&action=edit
testcase

Compiling attached testcase with option "-flto -O3 -fno-weak" will get:

during IPA pass: *free_lang_data                                                
ic.cpp:5:11: internal compiler error: in mangle_decl, at cp/mangle.c:4088       
    5 |     class InnerParent {                                                 
      |           ^~~~~~~~~~~                                                   
0xbe3ef2 mangle_decl(tree_node*)                                                
        ../../gcc/cp/mangle.c:4088                                              
0x17b0ac4 decl_assembler_name(tree_node*)
        ../../gcc/tree.c:710
0x17bd358 assign_assembler_name_if_needed(tree_node*)
        ../../gcc/tree.c:6318
0x17bd471 free_lang_data_in_cgraph
        ../../gcc/tree.c:6366
0x17bd606 free_lang_data
        ../../gcc/tree.c:6411
0x17bd7ac execute
        ../../gcc/tree.c:6483


More information about the Gcc-bugs mailing list