From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 08B853858415; Tue, 18 Oct 2022 17:44:39 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 08B853858415 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1666115079; bh=Fekstxb7fBdGM47rSKrDY0yNDJTszbyUtt0fhGLBsH0=; h=From:To:Subject:Date:From; b=yCNaif2F9IKMRloN8d6Ww1IHZjAJf/JcCZue5QujPq11hEb5gVUFfDdAtoROtc1vt 0/EjxhxWErHzMbon2PVurswBZGZ+JBWboB2PniY8+RDarimObDgNN3qNXO+y2+h6uH DqUtDaNHz7b6Rt1Shg6VByyS6hS9bMH6AVZX1ETA= From: "gscfq@t-online.de" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/107307] New: ICE tree check: expected class 'type', have 'exceptional' (error_mark) in canonicalize_component_ref, at gimplify.cc:2923 Date: Tue, 18 Oct 2022 17:44:38 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: gscfq@t-online.de X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D107307 Bug ID: 107307 Summary: ICE tree check: expected class 'type', have 'exceptional' (error_mark) in canonicalize_component_ref, at gimplify.cc:2923 Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: gscfq@t-online.de Target Milestone: --- Started with r12 between 20210822 and 20210905 : $ cat z1.c void f () { const struct { int a[1]; } b; int *c =3D b.a; int *b; } $ gcc-13-20221016 -c z1.c z1.c: In function 'f': z1.c:4:12: warning: initialization discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers] 4 | int *c =3D b.a; | ^ z1.c:5:8: error: conflicting type qualifiers for 'b' 5 | int *b; | ^ z1.c:3:30: note: previous declaration of 'b' with type 'const struct ' 3 | const struct { int a[1]; } b; | ^ z1.c:4:13: internal compiler error: tree check: expected class 'type', have 'exceptional' (error_mark) in canonicalize_component_ref, at gimplify.cc:29= 23 4 | int *c =3D b.a; | ~^~ 0x6acb6d tree_class_check_failed(tree_node const*, tree_code_class, char const*, int, char const*) ../../gcc/tree.cc:8886 0xb8578e tree_class_check(tree_node*, tree_code_class, char const*, int, ch= ar const*) ../../gcc/tree.h:3649 0xb8578e canonicalize_component_ref ../../gcc/gimplify.cc:2923 0xba3857 gimplify_compound_lval ../../gcc/gimplify.cc:3326 0xb9753a gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*= ), int) ../../gcc/gimplify.cc:16280 0xbaa91a gimplify_addr_expr ../../gcc/gimplify.cc:6529 0xb9913d gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*= ), int) ../../gcc/gimplify.cc:16375 0xba931f gimplify_modify_expr ../../gcc/gimplify.cc:6121 0xb998f7 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*= ), int) ../../gcc/gimplify.cc:16328 0xb9d7d8 gimplify_stmt(tree_node**, gimple**) ../../gcc/gimplify.cc:7187 0xba2343 gimplify_and_add(tree_node*, gimple**) ../../gcc/gimplify.cc:492 0xba2343 gimplify_decl_expr ../../gcc/gimplify.cc:1938 0xb988b2 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*= ), int) ../../gcc/gimplify.cc:16525 0xb9d7d8 gimplify_stmt(tree_node**, gimple**) ../../gcc/gimplify.cc:7187 0xb98bcb gimplify_statement_list ../../gcc/gimplify.cc:2021 0xb98bcb gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*= ), int) ../../gcc/gimplify.cc:16773 0xb9d7d8 gimplify_stmt(tree_node**, gimple**) ../../gcc/gimplify.cc:7187 0xb9e163 gimplify_bind_expr ../../gcc/gimplify.cc:1430 0xb990da gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*= ), int) ../../gcc/gimplify.cc:16529 0xb9d7d8 gimplify_stmt(tree_node**, gimple**) ../../gcc/gimplify.cc:7187=