[Bug c/108423] [12/13 Regression] ICE in make_ssa_name_fn with VLA types in arguments and inlining since r12-5338-g4e6bf0b9dd5585df

muecker at gwdg dot de gcc-bugzilla@gcc.gnu.org
Sun Jan 22 14:30:44 GMT 2023


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108423

--- Comment #7 from Martin Uecker <muecker at gwdg dot de> ---


* gimplify_type_size does not recurse into pointer, record, or function types
(the later are not mentioned). 

* the C FE has code to emit fake TYPE_DECLs for pointer types in
c-decl.cc/grokdeclarator 

* In the FE, size expressions in parameters go into pending_sizes and emitted
at a start of a function c-decl.cc/store_parm_decls

* function.cc/gimplify_parm_type only considers types with non-constant size
and otherwise recurses only into pointer types


How all this fits together is a bit of mystery to me. 

Modifying gimplify_parm_type to also recurse into function types seems to fix
this bug (and PR107557) but I am not sure if this is the right fix. Then there
should also be similar missing cases related to records/unions?


More information about the Gcc-bugs mailing list