https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104513
--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
--- gcc/cp/constexpr.cc.jj 2022-02-11 13:52:32.697425776 +0100
+++ gcc/cp/constexpr.cc 2022-02-12 13:51:21.000274390 +0100
@@ -9364,7 +9364,7 @@ potential_constant_expression_1 (tree t,
{
tree *target = &TREE_OPERAND (t, 0);
/* Gotos representing break and continue are OK. */
- if (breaks (target) || continues (target))
+ if (breaks (target) || continues (target) || returns (target))
{
*jump_target = *target;
return true;
fixes it, but am not sure if it is the right thing for constexpr dtors for
classes with base classes.