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

            Bug ID: 91572
           Summary: [9/10 Regression] lto1: error: type variant has
                    different ‘TREE_TYPE’ since r269862
           Product: gcc
           Version: 10.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: lto
          Assignee: unassigned at gcc dot gnu.org
          Reporter: marxin at gcc dot gnu.org
                CC: jakub at gcc dot gnu.org, marxin at gcc dot gnu.org
  Target Milestone: ---

Starting from the revision, I see 

$ cat openexr.ii
void fn1(char);
namespace Imf_2_3 {
class A {
  A();
};
int a;
A::A() { __asm__("" : "=d"(a)); }
} // namespace Imf_2_3

$ gcc -flto -shared -O openexr.ii -fPIC
lto1: error: type variant has different ‘TREE_TYPE’
 <array_type 0x7f2cf9f91150
    type <integer_type 0x7f2cf9f910a8 char public QI
        size <integer_cst 0x7f2cfa18ac90 constant 8>
        unit-size <integer_cst 0x7f2cfa18aca8 constant 1>
        align:8 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type
0x7f2cfa19f3f0 precision:8 min <integer_cst 0x7f2cfa382660 -128> max
<integer_cst 0x7f2cfa382678 127>>
    BLK
    size <integer_cst 0x7f2cfa1a9048 type <integer_type 0x7f2cfa19f0a8
bitsizetype> constant 24>
    unit-size <integer_cst 0x7f2cfa382648 type <integer_type 0x7f2cfa19f000
sizetype> constant 3>
    align:8 warn_if_not_align:0 symtab:0 alias-set -1 structural-equality
    domain <integer_type 0x7f2cf9f91000
        type <integer_type 0x7f2cfa19f000 sizetype public unsigned DI
            size <integer_cst 0x7f2cfa18aba0 constant 64>
            unit-size <integer_cst 0x7f2cfa18abb8 constant 8>
            align:64 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type
0x7f2cfa19f738 precision:64 min <integer_cst 0x7f2cfa18abd0 0> max <integer_cst
0x7f2cfa18b4a0 18446744073709551615>>
        DI size <integer_cst 0x7f2cfa18aba0 64> unit-size <integer_cst
0x7f2cfa18abb8 8>
        align:64 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type
0x7f2cfa19f738 precision:64 min <integer_cst 0x7f2cfa18abd0 0> max <integer_cst
0x7f2cfa18ad68 2>>>
lto1: error: type variant’s ‘TREE_TYPE’
 <integer_type 0x7f2cf9f910a8 char public QI
    size <integer_cst 0x7f2cfa18ac90 type <integer_type 0x7f2cfa19f0a8
bitsizetype> constant 8>
    unit-size <integer_cst 0x7f2cfa18aca8 type <integer_type 0x7f2cfa19f000
sizetype> constant 1>
    align:8 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type
0x7f2cfa19f3f0 precision:8 min <integer_cst 0x7f2cfa382660 -128> max
<integer_cst 0x7f2cfa382678 127>>
lto1: error: type’s ‘TREE_TYPE’
 <integer_type 0x7f2cf9f911f8 char readonly QI
    size <integer_cst 0x7f2cfa18ac90 type <integer_type 0x7f2cfa19f0a8
bitsizetype> constant 8>
    unit-size <integer_cst 0x7f2cfa18aca8 type <integer_type 0x7f2cfa19f000
sizetype> constant 1>
    align:8 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type
0x7f2cfa19f3f0 precision:8 min <integer_cst 0x7f2cfa382660 -128> max
<integer_cst 0x7f2cfa382678 127>>
 <array_type 0x7f2cf9f912a0
    type <integer_type 0x7f2cf9f911f8 char readonly QI
        size <integer_cst 0x7f2cfa18ac90 constant 8>
        unit-size <integer_cst 0x7f2cfa18aca8 constant 1>
        align:8 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type
0x7f2cfa19f3f0 precision:8 min <integer_cst 0x7f2cfa382660 -128> max
<integer_cst 0x7f2cfa382678 127>>
    BLK
    size <integer_cst 0x7f2cfa1a9048 type <integer_type 0x7f2cfa19f0a8
bitsizetype> constant 24>
    unit-size <integer_cst 0x7f2cfa382648 type <integer_type 0x7f2cfa19f000
sizetype> constant 3>
    align:8 warn_if_not_align:0 symtab:0 alias-set -1 structural-equality
    domain <integer_type 0x7f2cf9f91000
        type <integer_type 0x7f2cfa19f000 sizetype public unsigned DI
            size <integer_cst 0x7f2cfa18aba0 constant 64>
            unit-size <integer_cst 0x7f2cfa18abb8 constant 8>
            align:64 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type
0x7f2cfa19f738 precision:64 min <integer_cst 0x7f2cfa18abd0 0> max <integer_cst
0x7f2cfa18b4a0 18446744073709551615>>
        DI size <integer_cst 0x7f2cfa18aba0 64> unit-size <integer_cst
0x7f2cfa18abb8 8>
        align:64 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type
0x7f2cfa19f738 precision:64 min <integer_cst 0x7f2cfa18abd0 0> max <integer_cst
0x7f2cfa18ad68 2>>>
lto1: internal compiler error: ‘verify_type’ failed
0xf6cec8 verify_type(tree_node const*)
        /home/marxin/Programming/gcc/gcc/tree.c:14775
0x7f62d7 lto_fixup_state
        /home/marxin/Programming/gcc/gcc/lto/lto-common.c:2582
0x800e54 lto_fixup_decls
        /home/marxin/Programming/gcc/gcc/lto/lto-common.c:2613
0x800e54 read_cgraph_and_symbols(unsigned int, char const**)
        /home/marxin/Programming/gcc/gcc/lto/lto-common.c:2848
0x7e7562 lto_main()
        /home/marxin/Programming/gcc/gcc/lto/lto.c:616
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
lto-wrapper: fatal error: gcc returned 1 exit status
compilation terminated.
/usr/bin/ld: error: lto-wrapper failed
collect2: error: ld returned 1 exit status

Reply via email to