From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 4CE373846083; Tue, 25 Jun 2024 12:31:20 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4CE373846083 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1719318680; bh=S2ujgzxrUv/e2DnvSuwQihN6lytKj01BigmEkwccpmc=; h=From:To:Subject:Date:From; b=YefX+DvL1b01RBCswEgsgVfv+QqUSzWapTEl8XQfzD4IkMzjVSlajsVpb19La6xJ0 rKQy04Yg+FHuB4rulYvRDSeQYG1dAu9x0oGtHXpcR67Kxh4AvSkP7y7Y0bgD2PDC4B VheiJeRrxVwgVIrzhWlB8iYccjEeVJufruv2U/9g= From: "141242068 at smail dot nju.edu.cn" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/115642] New: [gcc][trunk] internal compiler error: tree check: expected class 'type', have 'exceptional' (error_mark) in c_expr_sizeof_expr Date: Tue, 25 Jun 2024 12:31:19 +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: 15.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=3D115642 Bug ID: 115642 Summary: [gcc][trunk] internal compiler error: tree check: expected class 'type', have 'exceptional' (error_mark) in c_expr_sizeof_expr Product: gcc Version: 15.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: --- Compiler explorer: https://gcc.godbolt.org/z/EWcfsT9hW This crash involve gcc-trunk, no additional options are required. The crash triggering program: ``` void f (int N) { int a[2][N];=20 sizeof ((int [2][N])a); } ``` The stack dump: ``` :3:3: internal compiler error: tree check: expected class 'type', h= ave 'exceptional' (error_mark) in c_expr_sizeof_expr, at c/c-typeck.cc:3390 3 | sizeof ((int [2][N])a); | ^~~~~~ 0x23be10c internal_error(char const*, ...) ???:0 0x8948df tree_class_check_failed(tree_node const*, tree_code_class, char const*, int, char const*) ???:0 0xa3bf1b c_parse_file() ???:0 0xab5959 c_common_parse_file() ???: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. ```=