https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113207
Bug ID: 113207 Summary: [14 Regression] error: type variant has different 'TREE_TYPE' Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: lto Assignee: unassigned at gcc dot gnu.org Reporter: doko at gcc dot gnu.org CC: marxin at gcc dot gnu.org Target Milestone: --- seen with trunk 20240101, with -flto $ cat predlib.i typedef struct cl_lispunion *cl_object; struct cl_lispunion {}; cl_object cl_error() __attribute__((noreturn)); volatile cl_object cl_coerce_value0; void cl_coerce() { cl_error(); } void L66safe_canonical_type(cl_object volatile); $ gcc -O2 -flto=auto -fstack-protector-strong -fstack-clash-protection -fcf-protection -c predlib.i predlib.i:6:1: error: type variant has different 'TREE_TYPE' 6 | void L66safe_canonical_type(cl_object volatile); | ^~~~ <function_type 0x7efc56d6ddc8 type <pointer_type 0x7efc56d883f0 cl_object type <record_type 0x7efc56d882a0 cl_lispunion VOID align:8 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type 0x7efc56d6dbd0 pointer_to_this <pointer_type 0x7efc56d88348>> unsigned DI size <integer_cst 0x7efc56bbff48 constant 64> unit-size <integer_cst 0x7efc56bbff60 constant 8> align:64 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type 0x7efc56d6dc78> QI size <integer_cst 0x7efc56be1048 type <integer_type 0x7efc56bdf0a8 bitsizetype> constant 8> unit-size <integer_cst 0x7efc56be1060 type <integer_type 0x7efc56bdf000 sizetype> constant 1> align:8 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type 0x7efc56d6de70 pointer_to_this <pointer_type 0x7efc56d88000>> predlib.i:6:1: error: type variant's 'TREE_TYPE' <pointer_type 0x7efc56d883f0 cl_object type <record_type 0x7efc56d882a0 cl_lispunion VOID align:8 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type 0x7efc56d6dbd0 pointer_to_this <pointer_type 0x7efc56d88348>> unsigned DI size <integer_cst 0x7efc56bbff48 type <integer_type 0x7efc56bdf0a8 bitsizetype> constant 64> unit-size <integer_cst 0x7efc56bbff60 type <integer_type 0x7efc56bdf000 sizetype> constant 8> align:64 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type 0x7efc56d6dc78> predlib.i:6:1: error: type's 'TREE_TYPE' <pointer_type 0x7efc56d88540 cl_object type <record_type 0x7efc56d882a0 cl_lispunion VOID align:8 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type 0x7efc56d6dbd0 pointer_to_this <pointer_type 0x7efc56d88348>> unsigned DI size <integer_cst 0x7efc56bbff48 type <integer_type 0x7efc56bdf0a8 bitsizetype> constant 64> unit-size <integer_cst 0x7efc56bbff60 type <integer_type 0x7efc56bdf000 sizetype> constant 8> align:64 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type 0x7efc56d6dc78> <function_type 0x7efc56d6d7e0 type <pointer_type 0x7efc56d88540 cl_object type <record_type 0x7efc56d882a0 cl_lispunion VOID align:8 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type 0x7efc56d6dbd0 pointer_to_this <pointer_type 0x7efc56d88348>> unsigned DI size <integer_cst 0x7efc56bbff48 constant 64> unit-size <integer_cst 0x7efc56bbff60 constant 8> align:64 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type 0x7efc56d6dc78> volatile QI size <integer_cst 0x7efc56be1048 type <integer_type 0x7efc56bdf0a8 bitsizetype> constant 8> unit-size <integer_cst 0x7efc56be1060 type <integer_type 0x7efc56bdf000 sizetype> constant 1> align:8 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type 0x7efc56d6d888 pointer_to_this <pointer_type 0x7efc56d6d930>> during IPA pass: *free_lang_data predlib.i:6:1: internal compiler error: 'verify_type' failed 0x6bde44 verify_type(tree_node const*) ../../src/gcc/tree.cc:14386 0x20d2332 free_lang_data ../../src/gcc/ipa-free-lang-data.cc:1134 0x20d2332 execute ../../src/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 <file:///usr/share/doc/gcc-14/README.Bugs> for instructions.