On Thu, 18 Feb 2021, Jakub Jelinek wrote: > On Thu, Feb 18, 2021 at 01:37:29PM +0100, Richard Biener wrote: > > The following instructs IPA not to inline calls with VLA parameters > > and adjusts inlining not to create invalid view-converted VLA > > parameters on mismatch and makes the error_mark paths with debug > > stmts actually work. > > > > The first part avoids the ICEs with the testcases already. > > > > Bootstrapped and tested on x86_64-unknown-linux-gnu, does it > > look sane? > > > > Thanks, > > Richard. > > > > 2021-02-18 Richard Biener <rguent...@suse.de> > > > > PR middle-end/99122 > > * ipa-fnsummary.c (analyze_function_body): Set > > CIF_FUNCTION_NOT_INLINABLE for VLA parameter calls. > > * tree-inline.c (insert_init_debug_bind): Pass NULL for > > error_mark_node values. > > (force_value_to_type): Do not build V_C_Es for WITH_SIZE_EXPR > > values. > > (setup_one_parameter): Delay force_value_to_type until when > > it's needed. > > > > * gcc.dg/pr99122-1.c: New testcase. > > * gcc.dg/pr99122-2.c: Likewise. > > LGTM, but for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99122#c12 > I guess we still need something like Martin's patch.
Yeah. > Of course it can be fixed incrementally. Indeed, so I pushed the patch and will work on the followup, but likely only tomorrow. Richard.