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

            Bug ID: 114927
           Summary: ICE when building Emacs with -std=c23 -flto (error:
                    ‘TYPE_CANONICAL’ has different ‘TYPE_CANONICAL’)
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Keywords: ice-checking
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: sjames at gcc dot gnu.org
  Target Milestone: ---

Created attachment 58090
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=58090&action=edit
process.i.xz

Hit this when building Emacs with -std=c23 (which bleeding-edge autoconf now
defaults to).

(Calling this an FE issue for now unless proven otherwise, given richi's
comments on my other bug wrt where the checking is done.)

```
$ gcc -c ./process.i -std=c23 -flto
process.c:8920:1: error: ‘TYPE_CANONICAL’ has different ‘TYPE_CANONICAL’
 8920 | }
      | ^
 <function_type 0x7f39a8324d20
    type <integer_type 0x7f39a98235e8 int sizes-gimplified public SI
        size <integer_cst 0x7f39a9825198 constant 32>
        unit-size <integer_cst 0x7f39a98251b0 constant 4>
        align:32 warn_if_not_align:0 symtab:0 alias-set 11 canonical-type
0x7f39a98235e8 precision:32 min <integer_cst 0x7f39a9825150 -2147483648> max
<integer_cst 0x7f39a9825168 2147483647>
        pointer_to_this <pointer_type 0x7f39a982bb28>>
    QI
    size <integer_cst 0x7f39a9825048 type <integer_type 0x7f39a98230a8
bitsizetype> constant 8>
    unit-size <integer_cst 0x7f39a9825060 type <integer_type 0x7f39a9823000
sizetype> constant 1>
    align:8 warn_if_not_align:0 symtab:0 alias-set -1 structural-equality
    arg-types <tree_list 0x7f39a87ecc80
        value <pointer_type 0x7f39a81e4dc8 type <record_type 0x7f39a81e4d20
Lisp_Process>
            unsigned DI
            size <integer_cst 0x7f39a9802f48 constant 64>
            unit-size <integer_cst 0x7f39a9802f60 constant 8>
            align:64 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type
0x7f39a9852d20>
        chain <tree_list 0x7f39a981dd98 value <void_type 0x7f39a9823f18 void>>>
    pointer_to_this <pointer_type 0x7f39a67daa80>>
 <function_type 0x7f39a682e498
    type <integer_type 0x7f39a912c2a0 pid_t sizes-gimplified public SI
        size <integer_cst 0x7f39a9825198 constant 32>
        unit-size <integer_cst 0x7f39a98251b0 constant 4>
        align:32 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type
0x7f39a98235e8 precision:32 min <integer_cst 0x7f39a9825150 -2147483648> max
<integer_cst 0x7f39a9825168 2147483647>
        pointer_to_this <pointer_type 0x7f39a98540a8>>
    QI
    size <integer_cst 0x7f39a9825048 type <integer_type 0x7f39a98230a8
bitsizetype> constant 8>
    unit-size <integer_cst 0x7f39a9825060 type <integer_type 0x7f39a9823000
sizetype> constant 1>
    align:8 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type
0x7f39a8324d20
    arg-types <tree_list 0x7f39a683bbe0
        value <pointer_type 0x7f39a81e4dc8 type <record_type 0x7f39a81e4d20
Lisp_Process>
            unsigned DI
            size <integer_cst 0x7f39a9802f48 constant 64>
            unit-size <integer_cst 0x7f39a9802f60 constant 8>
            align:64 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type
0x7f39a9852d20>
        chain <tree_list 0x7f39a981dd98 value <void_type 0x7f39a9823f18 void>>>
    pointer_to_this <pointer_type 0x7f39a682e5e8>>
during IPA pass: *free_lang_data
process.c:8920:1: internal compiler error: ‘verify_type’ failed
0x55d8b1cdf912 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
0x55d8b3c5b46b 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
0x55d8b3c5b46b 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.
```

Reply via email to