Bug 102214 - [11/12/13/14 Regression] ICE when compiling local class with -fno-weak
Summary: [11/12/13/14 Regression] ICE when compiling local class with -fno-weak
Status: NEW
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 12.0
: P2 normal
Target Milestone: 11.5
Assignee: Not yet assigned to anyone
URL:
Keywords: ice-on-valid-code, lto
Depends on:
Blocks:
 
Reported: 2021-09-06 09:23 UTC by Feng Xue
Modified: 2023-10-23 20:43 UTC (History)
4 users (show)

See Also:
Host:
Target:
Build:
Known to work: 5.1.0
Known to fail: 6.1.0
Last reconfirmed: 2021-09-06 00:00:00


Attachments
testcase (204 bytes, text/x-modelica)
2021-09-06 09:23 UTC, Feng Xue
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Feng Xue 2021-09-06 09:23:55 UTC
Created attachment 51413 [details]
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
Comment 1 Andrew Pinski 2021-09-06 09:34:28 UTC
Confirmed, most likely started with r6-67 (like a few of the linked bugs).
Comment 2 Richard Biener 2022-05-27 09:46:11 UTC
GCC 9 branch is being closed
Comment 3 Jakub Jelinek 2022-06-28 10:46:16 UTC
GCC 10.4 is being released, retargeting bugs to GCC 10.5.
Comment 4 Richard Biener 2023-07-07 10:40:52 UTC
GCC 10 branch is being closed.