From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 3336E3858439; Tue, 23 May 2023 20:05:19 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3336E3858439 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1684872319; bh=UlHwCvulwRoBAsdMPEC2seGijinJjPxmVs+4zcwp5N0=; h=From:To:Subject:Date:In-Reply-To:References:From; b=iJbsrwZfwlzIqjIK5Xmba75LlbvfC/W01Fs6Hu89xxaNfeHJ+iObZjTohgYfLnS4K b9TIZ1ahgFoE+ebWGgZckaJ6RESQAF6v25zH3StdxrV24N/Vm5PFWZufF6tPGt2ukQ IHNu1gjHwTeyA5fE0fb6+9X99EWtuIj0ztHKZPsY= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/108423] [12/13/14 Regression] ICE in make_ssa_name_fn with VLA types in arguments and inlining since r12-5338-g4e6bf0b9dd5585df Date: Tue, 23 May 2023 20:05:18 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 12.4 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: 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=3D108423 --- Comment #11 from CVS Commits --- The master branch has been updated by Martin Uecker : https://gcc.gnu.org/g:f9b5be322358ee63798e02a9103b6bbe459e7aea commit r14-1142-gf9b5be322358ee63798e02a9103b6bbe459e7aea Author: Martin Uecker Date: Thu Apr 13 19:37:12 2023 +0200 Fix ICEs related to VM types in C 1/2 [PR70418, PR107557, PR108423] Size expressions were sometimes lost and not gimplified correctly, lead= ing to ICEs and incorrect evaluation order. Fix this by 1) not recursing into pointers when gimplifying parameters in the middle-end (the code is mer= ged with gimplify_type_sizes), which is incorrect because it might access variab= les declared later for incomplete structs, and 2) tracking size expressions= for struct/union members correctly, 3) emitting code to evaluate size expressions for missing cases (nested functions, empty declarations, and structs/unions). PR c/70418 PR c/106465 PR c/107557 PR c/108423 gcc/c/ * c-decl.cc (start_decl): Make sure size expression are evaluated only in correct context. (grokdeclarator): Size expression in fields may need a bind expression, make sure DECL_EXPR is always created. (grokfield, declspecs_add_type): Pass along size expressions. (finish_struct): Remove unneeded DECL_EXPR. (start_function): Evaluate size expressions for nested function= s. * c-parser.cc (c_parser_struct_declarations, c_parser_struct_or_union_specifier): Pass along size expression= s. (c_parser_declaration_or_fndef): Evaluate size expression. (c_parser_objc_at_property_declaration, c_parser_objc_class_instance_variables): Adapt. * c-tree.h (grokfield): Adapt declaration. gcc/testsuite/ * gcc.dg/nested-vla-1.c: New test. * gcc.dg/nested-vla-2.c: New test. * gcc.dg/nested-vla-3.c: New test. * gcc.dg/pr70418.c: New test. * gcc.dg/pr106465.c: New test. * gcc.dg/pr107557-1.c: New test. * gcc.dg/pr107557-2.c: New test. * gcc.dg/pr108423-1.c: New test. * gcc.dg/pr108423-2.c: New test. * gcc.dg/pr108423-3.c: New test. * gcc.dg/pr108423-4.c: New test. * gcc.dg/pr108423-5.c: New test. * gcc.dg/pr108423-6.c: New test. * gcc.dg/typename-vla-2.c: New test. * gcc.dg/typename-vla-3.c: New test. * gcc.dg/typename-vla-4.c: New test. * gcc.misc-tests/gcov-pr85350.c: Adapt.=