https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114919
Bug ID: 114919
Summary: ICE when building ecl with LTO
Product: gcc
Version: 14.0
Status: UNCONFIRMED
Keywords: ice-checking
Severity: normal
Priority: P3
Component: lto
Assignee: unassigned at gcc dot gnu.org
Reporter: sjames at gcc dot gnu.org
Target Milestone: ---
Created attachment 58083
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=58083&action=edit
predlib.i.xz
This might be a dupe of PR114918 but figured I'd keep it separate in case it
isn't.
```
$ gcc -c predlib.i -flto
lsp/predlib.c:5255:1: error: type variant has different ‘TREE_TYPE’
<function_type 0x7f5f675003f0
type <pointer_type 0x7f5f67548f18 cl_object
type <union_type 0x7f5f67548dc8 cl_lispunion VOID
align:8 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type
0x7f5f674fc7e0
pointer_to_this <pointer_type 0x7f5f67548e70>>
unsigned DI
size <integer_cst 0x7f5f67a02f48 constant 64>
unit-size <integer_cst 0x7f5f67a02f60 constant 8>
align:64 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type
0x7f5f674fc9d8
pointer_to_this <pointer_type 0x7f5f676cd888>>
QI
size <integer_cst 0x7f5f67a25048 type <integer_type 0x7f5f67a230a8
bitsizetype> constant 8>
unit-size <integer_cst 0x7f5f67a25060 type <integer_type 0x7f5f67a23000
sizetype> constant 1>
align:8 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type
0x7f5f67500498
pointer_to_this <pointer_type 0x7f5f67500738>>
lsp/predlib.c:5255:1: error: type variant’s ‘TREE_TYPE’
<pointer_type 0x7f5f67548f18 cl_object
type <union_type 0x7f5f67548dc8 cl_lispunion VOID
align:8 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type
0x7f5f674fc7e0
pointer_to_this <pointer_type 0x7f5f67548e70>>
unsigned DI
size <integer_cst 0x7f5f67a02f48 type <integer_type 0x7f5f67a230a8
bitsizetype> constant 64>
unit-size <integer_cst 0x7f5f67a02f60 type <integer_type 0x7f5f67a23000
sizetype> constant 8>
align:64 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type
0x7f5f674fc9d8
pointer_to_this <pointer_type 0x7f5f676cd888>>
lsp/predlib.c:5255:1: error: type’s ‘TREE_TYPE’
<pointer_type 0x7f5f66b40690 cl_object
type <union_type 0x7f5f67548dc8 cl_lispunion VOID
align:8 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type
0x7f5f674fc7e0
pointer_to_this <pointer_type 0x7f5f67548e70>>
unsigned DI
size <integer_cst 0x7f5f67a02f48 type <integer_type 0x7f5f67a230a8
bitsizetype> constant 64>
unit-size <integer_cst 0x7f5f67a02f60 type <integer_type 0x7f5f67a23000
sizetype> constant 8>
align:64 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type
0x7f5f674fc9d8
pointer_to_this <pointer_type 0x7f5f66b40f18>>
<function_type 0x7f5f66ecd5e8
type <pointer_type 0x7f5f66b40690 cl_object
type <union_type 0x7f5f67548dc8 cl_lispunion VOID
align:8 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type
0x7f5f674fc7e0
pointer_to_this <pointer_type 0x7f5f67548e70>>
unsigned DI
size <integer_cst 0x7f5f67a02f48 constant 64>
unit-size <integer_cst 0x7f5f67a02f60 constant 8>
align:64 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type
0x7f5f674fc9d8
pointer_to_this <pointer_type 0x7f5f66b40f18>>
QI
size <integer_cst 0x7f5f67a25048 type <integer_type 0x7f5f67a230a8
bitsizetype> constant 8>
unit-size <integer_cst 0x7f5f67a25060 type <integer_type 0x7f5f67a23000
sizetype> constant 1>
align:8 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type
0x7f5f67500498
pointer_to_this <pointer_type 0x7f5f66ecd348>>
during IPA pass: *free_lang_data
lsp/predlib.c:5255:1: internal compiler error: ‘verify_type’ failed
0x55a3d2d8f912 verify_type(tree_node const*)
/usr/src/debug/sys-devel/gcc-14.0.1_pre20240430/gcc-14.1.0-RC-20240430/gcc/tree.cc:14395
0x55a3d4d0b46b free_lang_data
/usr/src/debug/sys-devel/gcc-14.0.1_pre20240430/gcc-14.1.0-RC-20240430/gcc/ipa-free-lang-data.cc:1134
0x55a3d4d0b46b execute
/usr/src/debug/sys-devel/gcc-14.0.1_pre20240430/gcc-14.1.0-RC-20240430/gcc/ipa-free-lang-data.cc:1176
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <https://bugs.gentoo.org/> for instructions.
```