From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id B020C3858D39; Mon, 15 Apr 2024 15:33:07 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B020C3858D39 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1713195187; bh=tNGSdVR9mkGtxJmlt5lDPJQ1hVGLyvzSkO5hL11tgtE=; h=From:To:Subject:Date:From; b=fF8zYWJEyzChzqiJnyYuWzpVt7ls8ns2zvqRZ0LrymSclgFCUwrwqG0mDo0lY8DrW rMPOUhekvHmdubqRu/nO7fAIoFIy8y/JlTnLVffOxHq2svlyXTzfZsw/0nj+rO+5pf yWHCnZAu3Ec10zop4rkOy/oEPsPp76bfV9GO9eXE= From: "luigighiron at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/114723] New: ICE when checking for type compatibility with structure that contains flexible array member Date: Mon, 15 Apr 2024 15:33:07 +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: luigighiron at gmail dot com 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=3D114723 Bug ID: 114723 Summary: ICE when checking for type compatibility with structure that contains flexible array member Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: luigighiron at gmail dot com Target Milestone: --- The following code causes an internal compiler error on GCC 14: #include struct S{int x,y[1];}*a; int main(void){ struct S{int x,y[];}; puts(_Generic( a, struct S*:"compatible", default:"incompatible" )); } If I understand the type compatibility rules, these types should be compati= ble? The types "int[1]" and "int[]" are compatible and everything else seems to match exactly. Interestingly, it seems to also crash when checking if the t= ype of a is compatible with struct S (instead of struct S*).=