https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88857
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org --- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Indeed: class S { int a; }; void foo (const S &, int); template <int N> void bar () { foo ({}); } With s/class/struct/ it doesn't ICE. build_value_init has an assertion that 346 /* The AGGR_INIT_EXPR tweaking below breaks in templates. */ 347 gcc_assert (!processing_template_decl 348 || (SCALAR_TYPE_P (type) || TREE_CODE (type) == ARRAY_TYPE)); So, shall convert_like_real just not call it at all if processing_template_decl?