From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 591D93858423; Mon, 17 Jul 2023 09:14:33 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 591D93858423 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1689585273; bh=t626CRpiN/sDfB2EVUCmEm5WNhW/8U5qb6pbBYNtpRc=; h=From:To:Subject:Date:From; b=BhPG1wMKh5KoKAfMzFPIGYstOT/OsC4Jl2yJZI1/iWT7qJHZmEzLQlJ2mh+czTB1O Fj9ogbY0AtmoTj3x8P8nYgGxTe+vmtR27ONkI3kGjsE0rCodCJ7RmcnXJLJ+mDQMor tPK91/AxPZ0oaO9odQROt3o09VIfRaHkTXvplHsU= From: "141242068 at smail dot nju.edu.cn" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/110699] New: internal compiler error: tree check: expected array_type, have error_mark in array_ref_low_bound, at tree.cc:12754 Date: Mon, 17 Jul 2023 09:14:31 +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: 14.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: 141242068 at smail dot nju.edu.cn 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=3D110699 Bug ID: 110699 Summary: internal compiler error: tree check: expected array_type, have error_mark in array_ref_low_bound, at tree.cc:12754 Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: 141242068 at smail dot nju.edu.cn Target Milestone: --- When compiling below program using gcc-14 with option `gcc-14 a.c`, gcc-14 crashes: ``` typedef __attribute__((__vector_size__(64))) int T; void f(void) { extern char a[64], b[64]; void *p =3D a; T q =3D *(T *)&b[0]; } void g() { extern char b; } ``` GCC's output is pasted below: ``` : In function 'g': :10:15: error: conflicting types for 'b'; have 'char' 10 | extern char b; | ^ :4:22: note: previous declaration of 'b' with type 'char[64]' 4 | extern char a[64], b[64]; | ^ : In function 'f': :6:17: internal compiler error: tree check: expected array_type, ha= ve error_mark in array_ref_low_bound, at tree.cc:12754 6 | T q =3D *(T *)&b[0]; | ~^~~ 0x215104e internal_error(char const*, ...) ???:0 0x896b1b tree_check_failed(tree_node const*, char const*, int, char const*, ...) ???:0 0xd6c895 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*= ), int) ???:0 0xd6d557 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*= ), int) ???:0 0xd6db1d gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*= ), int) ???:0 0xd6cf6a gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*= ), int) ???:0 0xd7053a gimplify_stmt(tree_node**, gimple**) ???:0 0xd6d53e gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*= ), int) ???:0 0xd7053a gimplify_stmt(tree_node**, gimple**) ???:0 0xd6e4ab gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*= ), int) ???:0 0xd7053a gimplify_stmt(tree_node**, gimple**) ???:0 0xd6d914 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*= ), int) ???:0 0xd7053a gimplify_stmt(tree_node**, gimple**) ???:0 0xd719d3 gimplify_body(tree_node*, bool) ???:0 0xd71e2f gimplify_function_tree(tree_node*) ???:0 0xbaeba7 cgraph_node::analyze() ???:0 0xbb26f1 symbol_table::finalize_compilation_unit() ???:0 Please submit a full bug report, with preprocessed source (by using -freport-bug). Please include the complete backtrace with any bug report. See for instructions. ``` This can be verified by visiting the Compiler Explorer: https://gcc.godbolt.org/z/jPhnfG4f3=