This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/70029] New: [6 Regression] ICE with C++11 and -flto
- From: "reichelt at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 01 Mar 2016 13:43:53 +0000
- Subject: [Bug c++/70029] New: [6 Regression] ICE with C++11 and -flto
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70029
Bug ID: 70029
Summary: [6 Regression] ICE with C++11 and -flto
Product: gcc
Version: 6.0
Status: UNCONFIRMED
Keywords: ice-on-valid-code, lto
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: reichelt at gcc dot gnu.org
Target Milestone: ---
The following valid code snippet triggers an ICE on trunk when compiled with
"-std=c++11 -g -flto":
========================================================================
struct A
{
A();
int foo() && __attribute__ ((__warn_unused_result__)) { return 0; }
};
A a;
========================================================================
bug.cc:7:4: error: TYPE_CANONICAL of main variant is not main variant
A a;
^
<method_type 0x7fac2957f888
type <integer_type 0x7fac294417e0 int asm_written public type_6 SI
size <integer_cst 0x7fac2945f0a8 constant 32>
unit size <integer_cst 0x7fac2945f0c0 constant 4>
align 32 symtab 692482528 alias set 2 canonical type 0x7fac294417e0
precision 32 min <integer_cst 0x7fac2945f060 -2147483648> max <integer_cst
0x7fac2945f078 2147483647>
pointer_to_this <pointer_type 0x7fac29463930>>
tree_4 tree_5 QI
size <integer_cst 0x7fac2943df48 type <integer_type 0x7fac294412a0
bitsizetype> constant 8>
unit size <integer_cst 0x7fac2943df60 type <integer_type 0x7fac294411f8
sizetype> constant 1>
align 8 symtab 0 alias set -1 canonical type 0x7fac2957f888 method basetype
<record_type 0x7fac2957f348 A>
arg-types <tree_list 0x7fac29576d98
value <pointer_type 0x7fac2957f5e8 type <record_type 0x7fac2957f348 A>
asm_written unsigned DI
size <integer_cst 0x7fac2943de58 constant 64>
unit size <integer_cst 0x7fac2943de70 constant 8>
align 64 symtab 692482368 alias set -1 canonical type
0x7fac2957f5e8>
chain <tree_list 0x7fac29451c80 value <void_type 0x7fac29463150
void>>>>
<method_type 0x7fac2957f7e0
type <integer_type 0x7fac294417e0 int asm_written public type_6 SI
size <integer_cst 0x7fac2945f0a8 constant 32>
unit size <integer_cst 0x7fac2945f0c0 constant 4>
align 32 symtab 692482528 alias set 2 canonical type 0x7fac294417e0
precision 32 min <integer_cst 0x7fac2945f060 -2147483648> max <integer_cst
0x7fac2945f078 2147483647>
pointer_to_this <pointer_type 0x7fac29463930>>
QI
size <integer_cst 0x7fac2943df48 type <integer_type 0x7fac294412a0
bitsizetype> constant 8>
unit size <integer_cst 0x7fac2943df60 type <integer_type 0x7fac294411f8
sizetype> constant 1>
align 8 symtab 0 alias set -1 canonical type 0x7fac2957f7e0 method basetype
<record_type 0x7fac2957f348 A>
arg-types <tree_list 0x7fac29576d98
value <pointer_type 0x7fac2957f5e8 type <record_type 0x7fac2957f348 A>
asm_written unsigned DI
size <integer_cst 0x7fac2943de58 constant 64>
unit size <integer_cst 0x7fac2943de70 constant 8>
align 64 symtab 692482368 alias set -1 canonical type
0x7fac2957f5e8>
chain <tree_list 0x7fac29451c80 value <void_type 0x7fac29463150
void>>>>
<method_type 0x7fac2957f930
type <integer_type 0x7fac294417e0 int asm_written public type_6 SI
size <integer_cst 0x7fac2945f0a8 constant 32>
unit size <integer_cst 0x7fac2945f0c0 constant 4>
align 32 symtab 692482528 alias set 2 canonical type 0x7fac294417e0
precision 32 min <integer_cst 0x7fac2945f060 -2147483648> max <integer_cst
0x7fac2945f078 2147483647>
pointer_to_this <pointer_type 0x7fac29463930>>
QI
size <integer_cst 0x7fac2943df48 type <integer_type 0x7fac294412a0
bitsizetype> constant 8>
unit size <integer_cst 0x7fac2943df60 type <integer_type 0x7fac294411f8
sizetype> constant 1>
align 8 symtab 0 alias set -1 canonical type 0x7fac2957f888
attributes <tree_list 0x7fac29576dc0
purpose <identifier_node 0x7fac295948f0 __warn_unused_result__
bindings <(nil)>
local bindings <(nil)>>> method basetype <record_type
0x7fac2957f348 A>
arg-types <tree_list 0x7fac29576d98
value <pointer_type 0x7fac2957f5e8 type <record_type 0x7fac2957f348 A>
asm_written unsigned DI
size <integer_cst 0x7fac2943de58 constant 64>
unit size <integer_cst 0x7fac2943de70 constant 8>
align 64 symtab 692482368 alias set -1 canonical type
0x7fac2957f5e8>
chain <tree_list 0x7fac29451c80 value <void_type 0x7fac29463150
void>>>>
bug.cc:7:4: internal compiler error: verify_type failed
0xfa84c2 verify_type(tree_node const*)
../../gcc/gcc/tree.c:13900
0xfaa34b free_lang_data_in_cgraph
../../gcc/gcc/tree.c:5984
0xfaa34b free_lang_data
../../gcc/gcc/tree.c:6014
0xfaa34b execute
../../gcc/gcc/tree.c:6063
Please submit a full bug report, [etc.]
This is a regression w.r.t GCC 5.3.0.
The bug makes it impossible to compile Qt (Qt 5.4.2) programs with -flto,
because QString contains such a pattern.