https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88181
Bug ID: 88181 Summary: ICE: verify_type failed (error: type variant differs by TYPE_PACKED) Product: gcc Version: 9.0 Status: UNCONFIRMED Keywords: ice-checking, ice-on-valid-code Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: asolokha at gmx dot com Target Milestone: --- g++-9.0.0-alpha20181118 snapshot (r266255) ICEs when compiling gcc/testsuite/g++.dg/cpp0x/constexpr-tuple2.C w/ -fpack-struct -g: % g++-9.0.0-alpha20181118 -fpack-struct -g -c gcc/testsuite/g++.dg/cpp0x/constexpr-tuple2.C In file included from /usr/lib/gcc/x86_64-unknown-linux-gnu/9.0.0-alpha20181118/include/g++-v9/bits/move.h:55, from /usr/lib/gcc/x86_64-unknown-linux-gnu/9.0.0-alpha20181118/include/g++-v9/bits/stl_pair.h:59, from /usr/lib/gcc/x86_64-unknown-linux-gnu/9.0.0-alpha20181118/include/g++-v9/utility:70, from /usr/lib/gcc/x86_64-unknown-linux-gnu/9.0.0-alpha20181118/include/g++-v9/tuple:38, from gcc/testsuite/g++.dg/cpp0x/constexpr-tuple2.C:4: /usr/lib/gcc/x86_64-unknown-linux-gnu/9.0.0-alpha20181118/include/g++-v9/type_traits: In instantiation of 'struct std::conditional<true, const std::tuple<t1, t2>&, const std::__nonesuch_no_braces&>': /usr/lib/gcc/x86_64-unknown-linux-gnu/9.0.0-alpha20181118/include/g++-v9/tuple:1205:7: required from 'class std::tuple<t1, t2>' gcc/testsuite/g++.dg/cpp0x/constexpr-tuple2.C:14:31: required from here /usr/lib/gcc/x86_64-unknown-linux-gnu/9.0.0-alpha20181118/include/g++-v9/type_traits:2070:12: error: type variant differs by TYPE_PACKED 2070 | struct conditional | ^~~~~~~~~~~ <record_type 0x7f4b619b2690 tuple packed type_1 type_5 type_6 VOID align:8 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type 0x7f4b619b2690 fields <template_decl 0x7f4b617ea300 __ct type <method_type 0x7f4b617eb1f8 type <void_type 0x7f4b62d1df18 void> QI size <integer_cst 0x7f4b62cffee8 constant 8> unit-size <integer_cst 0x7f4b62cfff00 constant 1> align:8 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type 0x7f4b617e8f18 method basetype <record_type 0x7f4b619b2690 tuple> arg-types <tree_list 0x7f4b619c0118 value <pointer_type 0x7f4b617acd20> chain <tree_list 0x7f4b619baed8 value <record_type 0x7f4b61ce2930 allocator_arg_t> chain <tree_list 0x7f4b619baeb0 value <reference_type 0x7f4b617eb000> chain <tree_list 0x7f4b619b5398 value <reference_type 0x7f4b62577e70> chain <tree_list 0x7f4b62d13848>>>>>> ignored decl_1 VOID /usr/lib/gcc/x86_64-unknown-linux-gnu/9.0.0-alpha20181118/include/g++-v9/tuple:1199:18 align:1 warn_if_not_align:0 context <record_type 0x7f4b619b2690 tuple> parms <tree_list 0x7f4b619ba528 purpose <integer_cst 0x7f4b62cfff00 1> value <tree_vec 0x7f4b617df380 type <template_decl 0x7f4b617ea300 __ct > length:4 elt:0 <tree_list 0x7f4b619b5c80 value <type_decl 0x7f4b617dd980 _Alloc>> elt:1 <tree_list 0x7f4b619b5ca8 value <type_decl 0x7f4b617dda18 _U1>> elt:2 <tree_list 0x7f4b619b5cd0 value <type_decl 0x7f4b617ddab0 _U2>> elt:3 <tree_list 0x7f4b619ba500 purpose <integer_cst 0x7f4b62d21150 constant 0> value <parm_decl 0x7f4b617ea380 D.29628>>>> full-name "template<class _Alloc, class _U1, class _U2, typename std::enable_if<(_MoveConstructibleTuple<_U1, _U2>() && (! _ImplicitlyMoveConvertibleTuple<_U1, _U2>())), bool>::type <anonymous> > std::tuple<_T1, _T2>::tuple(std::allocator_arg_t, const _Alloc&, std::pair<_U1, _U2>&&) [with _Alloc = _Alloc; _U1 = _U1; _U2 = _U2; typename std::enable_if<(std::_TC<true, _T1, _T2>::_MoveConstructibleTuple<_U1, _U2>() && (! std::_TC<true, _T1, _T2>::_ImplicitlyMoveConvertibleTuple<_U1, _U2>())), bool>::type <anonymous> = <enumerator>; _T1 = t1; _T2 = t2]" chain <template_decl 0x7f4b617e6c00 __ct type <method_type 0x7f4b617e8e70> ignored decl_1 VOID /usr/lib/gcc/x86_64-unknown-linux-gnu/9.0.0-alpha20181118/include/g++-v9/tuple:1189:9 align:1 warn_if_not_align:0 context <record_type 0x7f4b619b2690 tuple> parms <tree_list 0x7f4b619b0eb0 purpose <integer_cst 0x7f4b62cfff00 1> value <tree_vec 0x7f4b617df2d8 type <template_decl 0x7f4b617e6c00 __ct > length:4 elt:0 <tree_list 0x7f4b619b0528 value <type_decl 0x7f4b617dd7b8 _Alloc>> elt:1 <tree_list 0x7f4b619b0550 value <type_decl 0x7f4b617dd850 _U1>> elt:2 <tree_list 0x7f4b619b0578 value <type_decl 0x7f4b617dd8e8 _U2>> elt:3 <tree_list 0x7f4b619b0e88 purpose <integer_cst 0x7f4b62d21180 constant 1> value <parm_decl 0x7f4b617e6c80 D.29607>>>> full-name "template<class _Alloc, class _U1, class _U2, typename std::enable_if<(_MoveConstructibleTuple<_U1, _U2>() && _ImplicitlyMoveConvertibleTuple<_U1, _U2>()), bool>::type <anonymous> > std::tuple<_T1, _T2>::tuple(std::allocator_arg_t, const _Alloc&, std::pair<_U1, _U2>&&) [with _Alloc = _Alloc; _U1 = _U1; _U2 = _U2; typename std::enable_if<(std::_TC<true, _T1, _T2>::_MoveConstructibleTuple<_U1, _U2>() && std::_TC<true, _T1, _T2>::_ImplicitlyMoveConvertibleTuple<_U1, _U2>()), bool>::type <anonymous> = <enumerator>; _T1 = t1; _T2 = t2]" chain <template_decl 0x7f4b617e6500 __ct >>> context <namespace_decl 0x7f4b62d19098 std> full-name "class std::tuple<t1, t2>" X() X(constX&) n_parents=1 use_template=1 interface-unknown pointer_to_this <pointer_type 0x7f4b617acd20> reference_to_this <reference_type 0x7f4b617bcdc8> chain <type_decl 0x7f4b617504c0 tuple>> <record_type 0x7f4b619b21f8 tuple readonly type_5 type_6 VOID align:8 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type 0x7f4b619b21f8 context <namespace_decl 0x7f4b62d19098 std> full-name "const class std::tuple<t1, t2>" X() X(constX&) n_parents=1 use_template=1 interface-unknown reference_to_this <reference_type 0x7f4b617bc5e8>> /usr/lib/gcc/x86_64-unknown-linux-gnu/9.0.0-alpha20181118/include/g++-v9/type_traits:2070:12: internal compiler error: verify_type failed 0x11a9383 verify_type(tree_node const*) /var/tmp/portage/sys-devel/gcc-9.0.0_alpha20181118/work/gcc-9-20181118/gcc/tree.c:14313 0xb8d204 gen_type_die_with_usage /var/tmp/portage/sys-devel/gcc-9.0.0_alpha20181118/work/gcc-9-20181118/gcc/dwarf2out.c:25375 0xb8e466 gen_type_die /var/tmp/portage/sys-devel/gcc-9.0.0_alpha20181118/work/gcc-9-20181118/gcc/dwarf2out.c:25605 0xb8ecfc modified_type_die /var/tmp/portage/sys-devel/gcc-9.0.0_alpha20181118/work/gcc-9-20181118/gcc/dwarf2out.c:13368 0xb8ef34 modified_type_die /var/tmp/portage/sys-devel/gcc-9.0.0_alpha20181118/work/gcc-9-20181118/gcc/dwarf2out.c:13238 0xb8f12d modified_type_die /var/tmp/portage/sys-devel/gcc-9.0.0_alpha20181118/work/gcc-9-20181118/gcc/dwarf2out.c:13435 0xb940cd add_type_attribute /var/tmp/portage/sys-devel/gcc-9.0.0_alpha20181118/work/gcc-9-20181118/gcc/dwarf2out.c:21532 0xb9fa77 gen_typedef_die /var/tmp/portage/sys-devel/gcc-9.0.0_alpha20181118/work/gcc-9-20181118/gcc/dwarf2out.c:25282 0xb9fa77 gen_typedef_die /var/tmp/portage/sys-devel/gcc-9.0.0_alpha20181118/work/gcc-9-20181118/gcc/dwarf2out.c:25216 0xb899a4 gen_decl_die /var/tmp/portage/sys-devel/gcc-9.0.0_alpha20181118/work/gcc-9-20181118/gcc/dwarf2out.c:26240 0xb8ca73 gen_member_die /var/tmp/portage/sys-devel/gcc-9.0.0_alpha20181118/work/gcc-9-20181118/gcc/dwarf2out.c:25059 0xb8ca73 gen_struct_or_union_type_die /var/tmp/portage/sys-devel/gcc-9.0.0_alpha20181118/work/gcc-9-20181118/gcc/dwarf2out.c:25155 0xb8d8dd gen_type_die_with_usage /var/tmp/portage/sys-devel/gcc-9.0.0_alpha20181118/work/gcc-9-20181118/gcc/dwarf2out.c:25551 0xb8e466 gen_type_die /var/tmp/portage/sys-devel/gcc-9.0.0_alpha20181118/work/gcc-9-20181118/gcc/dwarf2out.c:25605 0xb89e55 gen_decl_die /var/tmp/portage/sys-devel/gcc-9.0.0_alpha20181118/work/gcc-9-20181118/gcc/dwarf2out.c:26237 0xb8a46e dwarf2out_decl /var/tmp/portage/sys-devel/gcc-9.0.0_alpha20181118/work/gcc-9-20181118/gcc/dwarf2out.c:26782 0xb8a768 dwarf2out_type_decl /var/tmp/portage/sys-devel/gcc-9.0.0_alpha20181118/work/gcc-9-20181118/gcc/dwarf2out.c:26509 0xb8a768 dwarf2out_type_decl /var/tmp/portage/sys-devel/gcc-9.0.0_alpha20181118/work/gcc-9-20181118/gcc/dwarf2out.c:26504 0xe252f7 rest_of_type_compilation(tree_node*, int) /var/tmp/portage/sys-devel/gcc-9.0.0_alpha20181118/work/gcc-9-20181118/gcc/passes.c:339 0x84cf56 finish_struct_1(tree_node*) /var/tmp/portage/sys-devel/gcc-9.0.0_alpha20181118/work/gcc-9-20181118/gcc/cp/class.c:7052