public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug other/98533] New: [11 Regression] ICE: 'verify_type' failed
@ 2021-01-05 14:25 doko at debian dot org
  2021-01-05 14:34 ` [Bug other/98533] " jakub at gcc dot gnu.org
                   ` (13 more replies)
  0 siblings, 14 replies; 15+ messages in thread
From: doko at debian dot org @ 2021-01-05 14:25 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 98533
           Summary: [11 Regression] ICE: 'verify_type' failed
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: other
          Assignee: unassigned at gcc dot gnu.org
          Reporter: doko at debian dot org
  Target Milestone: ---

seen with trunk 20210102 on x86_64-linux-gnu, compiler configured with
--enable-checking=yes,extra,rtl, building the actiona package.

$ cat codelineedit.ii
typedef long quintptr;
template <typename T> struct IsQEnumHelper { const T declval0; };
template <typename T, int = IsQEnumHelper<T>::Value> struct QMetaTypeIdQObject;
template <typename T> struct QMetaTypeId2 {
  enum { Defined = QMetaTypeIdQObject<T>::Defined };
};
template <bool> struct MetaTypeDefinedHelper;
template <typename T>
void qRegisterMetaType(
    char *, T *,
    typename MetaTypeDefinedHelper<QMetaTypeId2<T>::IsBuiltIn>::defined =
        MetaTypeDefinedHelper<T ::IsBuiltIn>::Defined);
class ActionInstance {
  void isEnabled() const;
  template <typename> void evaluateListElement(int = [] {});
} newId = qRegisterMetaType("", reinterpret_cast<ActionInstance *>(quintptr()))

$ g++ -Wall -c -std=c++11 -g -O0 codelineedit.ii
codelineedit.ii: In instantiation of 'struct IsQEnumHelper<ActionInstance>':
codelineedit.ii:5:43:   required from 'struct QMetaTypeId2<ActionInstance>'
codelineedit.ii:9:6:   required by substitution of 'template<class T> void
qRegisterMetaType(char*, T*, typename
MetaTypeDefinedHelper<QMetaTypeId2<T>::IsBuiltIn>::defined) [with T =
ActionInstance]'
codelineedit.ii:16:79:   required from here
codelineedit.ii:2:30: error: type variant has different 'TYPE_FIELDS'
    2 | template <typename T> struct IsQEnumHelper { const T declval0; };
      |                              ^~~~~~~~~~~~~
 <record_type 0x7f08c58ba3f0 ActionInstance asm_written cxx-odr-p type_5 type_6
QI
    size <integer_cst 0x7f08c5765fa8 type <integer_type 0x7f08c57830a8
bitsizetype> constant 8>
    unit-size <integer_cst 0x7f08c5765fc0 type <integer_type 0x7f08c5783000
sizetype> constant 1>
    align:8 warn_if_not_align:0 symtab:-981933840 alias-set -1 canonical-type
0x7f08c58ba3f0
    fields <template_decl 0x7f08c58b5980 ._anon_1
        type <record_type 0x7f08c58badc8 ._anon_1 cxx-odr-p type_0 type_5
type_6 VOID
            size <integer_cst 0x7f08c5765f30 constant 0>
            unit-size <integer_cst 0x7f08c5765ee8 constant 0>
            align:8 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type
0x7f08c58badc8 fields <using_decl 0x7f08c58b9a18 operator=> context
<record_type 0x7f08c58ba3f0 ActionInstance>
            full-name "struct ActionInstance::<lambda()>"
            n_parents=0 use_template=0 interface-unknown
            chain <type_decl 0x7f08c58b9850 ._anon_1>>
        private VOID codelineedit.ii:15:55
        align:1 warn_if_not_align:0 context <record_type 0x7f08c58ba3f0
ActionInstance>
        parms <tree_list 0x7f08c58b8c08 tree_1 purpose <integer_cst
0x7f08c5765fc0 1>
            value <tree_vec 0x7f08c58a9740 type <template_decl 0x7f08c58b5900
evaluateListElement>
                length:1
                elt:0 <tree_list 0x7f08c58b8ac8 value <type_decl 0x7f08c58b9688
D.2123>>>>
        full-name "template<class> struct ActionInstance::<lambda()>"
        chain <function_decl 0x7f08c58b1700 isEnabled type <method_type
0x7f08c58ba7e0>
            public private external QI codelineedit.ii:14:8 align:16
warn_if_not_align:0 context <record_type 0x7f08c58ba3f0 ActionInstance>
            full-name "void ActionInstance::isEnabled() const" chain
<template_decl 0x7f08c58b5900 evaluateListElement>>> context
<translation_unit_decl 0x7f08c5772168 codelineedit.ii>
    full-name "class ActionInstance"
    X() X(constX&) this=(X&) n_parents=0 use_template=0 interface-unknown
    pointer_to_this <pointer_type 0x7f08c58ba930> chain <type_decl
0x7f08c58b9558 ActionInstance>>
codelineedit.ii:2:30: error: first mismatch is field
 <function_decl 0x7f08c58b1700 isEnabled
    type <method_type 0x7f08c58ba7e0
        type <void_type 0x7f08c5783f18 void asm_written type_6 VOID
            align:8 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type
0x7f08c5783f18
            pointer_to_this <pointer_type 0x7f08c578b000>>
        QI
        size <integer_cst 0x7f08c5765fa8 constant 8>
        unit-size <integer_cst 0x7f08c5765fc0 constant 1>
        align:8 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type
0x7f08c58ba7e0 method basetype <record_type 0x7f08c58ba3f0 ActionInstance>
        arg-types <tree_list 0x7f08c58b8a28 value <pointer_type 0x7f08c58ba5e8>
            chain <tree_list 0x7f08c57798e8 value <void_type 0x7f08c5783f18
void>>>>
    public private external QI codelineedit.ii:14:8 align:16
warn_if_not_align:0 context <record_type 0x7f08c58ba3f0 ActionInstance>
    full-name "void ActionInstance::isEnabled() const" chain <template_decl
0x7f08c58b5900 evaluateListElement>>
codelineedit.ii:2:30: error: and field
 <template_decl 0x7f08c58b5980 ._anon_1
    type <record_type 0x7f08c58badc8 ._anon_1 cxx-odr-p type_0 type_5 type_6
VOID
        size <integer_cst 0x7f08c5765f30 constant 0>
        unit-size <integer_cst 0x7f08c5765ee8 constant 0>
        align:8 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type
0x7f08c58badc8
        fields <using_decl 0x7f08c58b9a18 operator= decl_0 VOID
codelineedit.ii:15:55
            align:1 warn_if_not_align:0 context <record_type 0x7f08c58badc8
._anon_1> result <record_type 0x7f08c58badc8 ._anon_1> chain <function_decl
0x7f08c58b1900 operator()>> context <record_type 0x7f08c58ba3f0 ActionInstance>
        full-name "struct ActionInstance::<lambda()>"
        n_parents=0 use_template=0 interface-unknown
        chain <type_decl 0x7f08c58b9850 ._anon_1>>
    private VOID codelineedit.ii:15:55
    align:1 warn_if_not_align:0 context <record_type 0x7f08c58ba3f0
ActionInstance>
    parms <tree_list 0x7f08c58b8c08 tree_1
        purpose <integer_cst 0x7f08c5765fc0 constant 1>
        value <tree_vec 0x7f08c58a9740 type <template_decl 0x7f08c58b5900
evaluateListElement>
            length:1
            elt:0 <tree_list 0x7f08c58b8ac8 value <type_decl 0x7f08c58b9688
D.2123>>>>
    full-name "template<class> struct ActionInstance::<lambda()>" chain
<function_decl 0x7f08c58b1700 isEnabled>>
 <record_type 0x7f08c58ba540 ActionInstance readonly cxx-odr-p type_5 QI
    size <integer_cst 0x7f08c5765fa8 type <integer_type 0x7f08c57830a8
bitsizetype> constant 8>
    unit-size <integer_cst 0x7f08c5765fc0 type <integer_type 0x7f08c5783000
sizetype> constant 1>
    align:8 warn_if_not_align:0 symtab:-981933520 alias-set -1 canonical-type
0x7f08c58ba540
    fields <function_decl 0x7f08c58b1700 isEnabled
        type <method_type 0x7f08c58ba7e0 type <void_type 0x7f08c5783f18 void>
            QI size <integer_cst 0x7f08c5765fa8 8> unit-size <integer_cst
0x7f08c5765fc0 1>
            align:8 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type
0x7f08c58ba7e0 method basetype <record_type 0x7f08c58ba3f0 ActionInstance>
            arg-types <tree_list 0x7f08c58b8a28 value <pointer_type
0x7f08c58ba5e8>
                chain <tree_list 0x7f08c57798e8 value <void_type 0x7f08c5783f18
void>>>>
        public private external QI codelineedit.ii:14:8 align:16
warn_if_not_align:0 context <record_type 0x7f08c58ba3f0 ActionInstance>
        full-name "void ActionInstance::isEnabled() const"
        chain <template_decl 0x7f08c58b5900 evaluateListElement type
<method_type 0x7f08c58babd0>
            private ignored decl_1 VOID codelineedit.ii:15:28
            align:1 warn_if_not_align:0 context <record_type 0x7f08c58ba3f0
ActionInstance>
            parms <tree_list 0x7f08c58b8af0 purpose <integer_cst 0x7f08c5765fc0
1>
                value <tree_vec 0x7f08c58a9740 type <template_decl
0x7f08c58b5900 evaluateListElement>
                    length:1
                    elt:0 <tree_list 0x7f08c58b8ac8 value <type_decl
0x7f08c58b9688 D.2123>>>>
            full-name "template<class> void
ActionInstance::evaluateListElement(int)" chain <type_decl 0x7f08c58b95f0
ActionInstance>>> context <translation_unit_decl 0x7f08c5772168
codelineedit.ii>
    full-name "const class ActionInstance"
    X() X(constX&) this=(X&) n_parents=0 use_template=0 interface-unknown
    pointer_to_this <pointer_type 0x7f08c58ba5e8>>
codelineedit.ii:2:30: internal compiler error: 'verify_type' failed
0x626011 verify_type(tree_node const*)
        ../../src/gcc/tree.c:14906
0x12a9537 gen_type_die_with_usage
        ../../src/gcc/dwarf2out.c:25504
0x12a94a6 gen_type_die
        ../../src/gcc/dwarf2out.c:25735
0x12a16c6 gen_decl_die
        ../../src/gcc/dwarf2out.c:26450
0x12b99aa gen_member_die
        ../../src/gcc/dwarf2out.c:25188
0x12b99aa gen_struct_or_union_type_die
        ../../src/gcc/dwarf2out.c:25284
0x12b99aa gen_tagged_type_die
        ../../src/gcc/dwarf2out.c:25485
0x12a96c5 gen_type_die_with_usage
        ../../src/gcc/dwarf2out.c:25680
0x12a94a6 gen_type_die
        ../../src/gcc/dwarf2out.c:25735
0x12a1854 gen_decl_die
        ../../src/gcc/dwarf2out.c:26374
0x1265c6d dwarf2out_decl
        ../../src/gcc/dwarf2out.c:26929
0x12b65fa dwarf2out_type_decl
        ../../src/gcc/dwarf2out.c:26647
0x12b65fa rest_of_type_compilation(tree_node*, int)
        ../../src/gcc/passes.c:339
0x136210e finish_struct_1(tree_node*)
        ../../src/gcc/cp/class.c:7524
0x14d0c68 instantiate_class_template_1
        ../../src/gcc/cp/pt.c:12205
0x126e5bb instantiate_class_template(tree_node*)
        ../../src/gcc/cp/pt.c:12240
0x126e5bb complete_type(tree_node*)
        ../../src/gcc/cp/typeck.c:137
0x1328b87 complete_type(tree_node*)
        ../../src/gcc/tree.h:3337
0x1328b87 lookup_member(tree_node*, tree_node*, int, bool, int,
access_failure_info*)
        ../../src/gcc/cp/search.c:1103
0x12ed3ed lookup_qualified_name(tree_node*, tree_node*, LOOK_want, bool)
        ../../src/gcc/cp/name-lookup.c:7241
Please submit a full bug report,
with preprocessed source if appropriate.

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2024-01-02 22:15 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-05 14:25 [Bug other/98533] New: [11 Regression] ICE: 'verify_type' failed doko at debian dot org
2021-01-05 14:34 ` [Bug other/98533] " jakub at gcc dot gnu.org
2021-01-05 14:39 ` jakub at gcc dot gnu.org
2021-01-05 20:16 ` marxin at gcc dot gnu.org
2021-01-06  8:43 ` rguenth at gcc dot gnu.org
2021-01-14 11:18 ` [Bug other/98533] [8/9/10/11 " rguenth at gcc dot gnu.org
2021-02-26 12:27 ` rguenth at gcc dot gnu.org
2021-03-07  9:59 ` doko at debian dot org
2021-05-14  9:54 ` [Bug other/98533] [9/10/11/12 " jakub at gcc dot gnu.org
2021-06-01  8:19 ` rguenth at gcc dot gnu.org
2022-05-27  9:44 ` [Bug c++/98533] [10/11/12/13 " rguenth at gcc dot gnu.org
2022-06-28 10:43 ` jakub at gcc dot gnu.org
2023-07-07 10:38 ` [Bug c++/98533] [11/12/13/14 " rguenth at gcc dot gnu.org
2023-10-14  7:16 ` zhroma at gcc dot gnu.org
2024-01-02 22:15 ` pinskia at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).