https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118169
--- Comment #20 from Marek Polacek <mpolacek at gcc dot gnu.org> --- Looks like this fixes it: --- a/gcc/cp/typeck2.cc +++ b/gcc/cp/typeck2.cc @@ -757,7 +757,7 @@ split_nonconstant_init (tree dest, tree init) init = NULL_TREE; for (tree f : flags) - add_stmt (build_disable_temp_cleanup (f)); + finish_expr_stmt (build_disable_temp_cleanup (f)); release_tree_vector (flags); code = pop_stmt_list (code);