https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94385
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org Status|UNCONFIRMED |NEW Target Milestone|--- |10.0 Last reconfirmed| |2020-03-28 Ever confirmed|0 |1 --- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Started with r10-317-ga52cf5cf278e4a9e58bfa2bb67a93244766a122f , latent before I think. IMHO --- gcc/cp/semantics.c.jj 2020-03-28 10:19:14.898349472 +0100 +++ gcc/cp/semantics.c 2020-03-29 00:02:40.648258781 +0100 @@ -380,7 +380,8 @@ add_stmt (tree t) /* When we expand a statement-tree, we must know whether or not the statements are full-expressions. We record that fact here. */ - STMT_IS_FULL_EXPR_P (t) = stmts_are_full_exprs_p (); + if (STATEMENT_CODE_P (TREE_CODE (t))) + STMT_IS_FULL_EXPR_P (t) = stmts_are_full_exprs_p (); } if (code == LABEL_EXPR || code == CASE_LABEL_EXPR) should fix this.