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

            Bug ID: 123862
           Summary: [16 Regression] ICE in verify_type when building
                    blender
           Product: gcc
           Version: 16.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code, needs-bisection
          Severity: normal
          Priority: P3
         Component: lto
          Assignee: unassigned at gcc dot gnu.org
          Reporter: jmelcr at gcc dot gnu.org
  Target Milestone: ---

Created attachment 63511
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=63511&action=edit
reduced reproducers

$ ~/gcc/build/bisect/install/bin/g++ -O2 -flto services.cpp.ii kernel.cpp.ii
lto1: error: ‘TYPE_CANONICAL’ is not compatible
 <record_type 0x7f114f89c2a0 LocalIntersection cxx-odr-p BLK
    size <integer_cst 0x7f114f88b7e0 type <integer_type 0x7f114fa170a8
bitsizetype> constant 1408>
    unit-size <integer_cst 0x7f114f88b840 type <integer_type 0x7f114fa17000
sizetype> constant 176>
    user align:128 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type
0x7f114f89c2a0
    fields <field_decl 0x7f114f899aa0 num_hits
        type <integer_type 0x7f114fa175e8 int public SI
            size <integer_cst 0x7f114fa1b018 constant 32>
            unit-size <integer_cst 0x7f114fa1b030 constant 4>
            align:32 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type
0x7f114fa175e8 precision:32 min <integer_cst 0x7f114fa02fc0 -2147483648> max
<integer_cst 0x7f114fa02fd8 2147483647>
            pointer_to_this <pointer_type 0x7f114fa1fb28>>
        nonlocal SI services.cpp.ii:12:7 size <integer_cst 0x7f114fa1b018 32>
unit-size <integer_cst 0x7f114fa1b030 4>
        align:32 warn_if_not_align:0 offset_align 128 decl_not_flexarray: 0
        offset <integer_cst 0x7f114fa02df8 constant 0>
        bit-offset <integer_cst 0x7f114fa02e40 constant 0> context <record_type
0x7f114f89c2a0 LocalIntersection>
        chain <field_decl 0x7f114f899be0 hits type <array_type 0x7f114f89c1f8>
            nonlocal BLK services.cpp.ii:13:16
            size <integer_cst 0x7f114fb0cf78 constant 768>
            unit-size <integer_cst 0x7f114f88b7c8 constant 96>
            align:32 warn_if_not_align:0 offset_align 128 decl_not_flexarray: 0
offset <integer_cst 0x7f114fa02df8 0> bit-offset <integer_cst 0x7f114fa1b018
32> context <record_type 0x7f114f89c2a0 LocalIntersection> chain <field_decl
0x7f114f899b40 Ng>>> context <namespace_decl 0x7f114f8993c0 ccl>
    pointer_to_this <pointer_type 0x7f114f89c348>>
 <record_type 0x7f114f89ca80 LocalIntersection cxx-odr-p BLK
    size <integer_cst 0x7f114f88b7e0 type <integer_type 0x7f114fa170a8
bitsizetype> constant 1408>
    unit-size <integer_cst 0x7f114f88b840 type <integer_type 0x7f114fa17000
sizetype> constant 176>
    user align:128 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type
0x7f114f89c2a0
    fields <field_decl 0x7f114f89f3c0 num_hits
        type <integer_type 0x7f114fa175e8 int public SI
            size <integer_cst 0x7f114fa1b018 constant 32>
            unit-size <integer_cst 0x7f114fa1b030 constant 4>
            align:32 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type
0x7f114fa175e8 precision:32 min <integer_cst 0x7f114fa02fc0 -2147483648> max
<integer_cst 0x7f114fa02fd8 2147483647>
            pointer_to_this <pointer_type 0x7f114fa1fb28>>
        nonlocal SI kernel.cpp.ii:10:7 size <integer_cst 0x7f114fa1b018 32>
unit-size <integer_cst 0x7f114fa1b030 4>
        align:32 warn_if_not_align:0 offset_align 128 decl_not_flexarray: 0
        offset <integer_cst 0x7f114fa02df8 constant 0>
        bit-offset <integer_cst 0x7f114fa02e40 constant 0> context <record_type
0x7f114f89ca80 LocalIntersection>
        chain <field_decl 0x7f114f89f500 hits type <array_type 0x7f114f89c1f8>
            nonlocal BLK kernel.cpp.ii:11:16
            size <integer_cst 0x7f114fb0cf78 constant 768>
            unit-size <integer_cst 0x7f114f88b7c8 constant 96>
            align:32 warn_if_not_align:0 offset_align 128 decl_not_flexarray: 0
offset <integer_cst 0x7f114fa02df8 0> bit-offset <integer_cst 0x7f114fa1b018
32> context <record_type 0x7f114f89ca80 LocalIntersection> chain <field_decl
0x7f114f89f460 Ng>>> context <namespace_decl 0x7f114f8993c0 ccl>
    pointer_to_this <pointer_type 0x7f114f89cb28>>
lto1: internal compiler error: ‘verify_type’ failed
0x247a8cd internal_error(char const*, ...)
        /home/jmelcr/gcc/src/gcc/gcc/diagnostic-global-context.cc:787
0x1450eae verify_type(tree_node const*)
        /home/jmelcr/gcc/src/gcc/gcc/tree.cc:14749
0xa67c5f lto_fixup_state
        /home/jmelcr/gcc/src/gcc/gcc/lto/lto-common.cc:2674
0xa6d2b4 lto_fixup_decls
        /home/jmelcr/gcc/src/gcc/gcc/lto/lto-common.cc:2705
0xa6d2b4 read_cgraph_and_symbols(unsigned int, char const**)
        /home/jmelcr/gcc/src/gcc/gcc/lto/lto-common.cc:2946
0xa4b552 lto_main()
        /home/jmelcr/gcc/src/gcc/gcc/lto/lto.cc:663
/home/jmelcr/gcc/build/bisect/install/libexec/gcc/x86_64-pc-linux-gnu/16.0.1/lto1
-quiet -dumpbase ./a.wpa -mtune=generic -march=x86-64 -O2 -O2 -fno-openmp
-fno-openacc -fno-pie -fcf-protection=none
-fltrans-output-list=/tmp/cckTBUDP.ltrans.out -fwpa
-fresolution=/tmp/cci0WymG.res -flinker-output=exec @/tmp/cc0GhClC
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
lto-wrapper: fatal error: /home/jmelcr/gcc/build/bisect/install/bin/g++
returned 1 exit status
compilation terminated.
/usr/bin/ld: error: lto-wrapper failed
collect2: error: ld returned 1 exit status

Configuration:
Using built-in specs.
COLLECT_GCC=/home/jmelcr/gcc/build/bisect/install/bin/g++
COLLECT_LTO_WRAPPER=/home/jmelcr/gcc/build/bisect/install/libexec/gcc/x86_64-pc-linux-gnu/16.0.1/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /home/jmelcr/gcc/src/gcc/configure
--prefix=/home/jmelcr/gcc/build/bisect/install --enable-languages=c,c++
--disable-bootstrap : (reconfigured) /home/jmelcr/gcc/src/gcc/configure
--prefix=/home/jmelcr/gcc/build/bisect/install --disable-bootstrap
--enable-languages=c,c++,lto --no-create --no-recursion
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 16.0.1 20260127 (experimental) (GCC)

Note that the ICE is order sensitive (if you swap the input files, it doesn't
crash). Works on 15.2.1

Reply via email to