From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id E21063858D1E; Tue, 24 Jan 2023 16:52:33 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E21063858D1E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1674579153; bh=dIPmg5OcF4foBLLhcJ8FVbVs6etKHtchPqfFi42anpc=; h=From:To:Subject:Date:From; b=PQvV5uE2CO4qneloTPCBQ0UUWH9fXl8y6iAXZgWwuedi8eanzotIkj5Y9QOGaAVkb 3Sw/Kt2+Wwxg6T2dN/VeyZx08B1nozYtk55p8r9QRKZKjVyDrTTUFQMp7F5ssHe0cb zUTvs2vRr6a2IeQOCis6h6+q5345swLswfSygjVw= From: "siddhesh at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/108522] New: [Regression 12/13] ICE in tree-object-size when struct has VLA Date: Tue, 24 Jan 2023 16:52:33 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: siddhesh at gcc dot gnu.org 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=3D108522 Bug ID: 108522 Summary: [Regression 12/13] ICE in tree-object-size when struct has VLA Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: siddhesh at gcc dot gnu.org Target Milestone: --- Reproducer: __SIZE_TYPE__ foo (unsigned int n) { struct { unsigned char a[n]; unsigned char b; } s; return __builtin_dynamic_object_size (&s.b, 1); } $ gcc/cc1 -quiet ../repro.cc -O2 -Wall -o - .file "repro.cc" .text during GIMPLE pass: objsz ../repro.cc: In function =E2=80=98foo=E2=80=99: ../repro.cc:1:15: internal compiler error: in execute_todo, at passes.cc:21= 40 1 | __SIZE_TYPE__ foo (unsigned int n) | ^~~ 0x72216f execute_todo ../../gcc/passes.cc:2140 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. Looks like getting the size of object for a pointer right after a VLA in a struct results in an ICE. I'm on it.=