diff options
Diffstat (limited to 'gcc/cp/constexpr.cc')
-rw-r--r-- | gcc/cp/constexpr.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/cp/constexpr.cc b/gcc/cp/constexpr.cc index 87f3a7b..7274c3b 100644 --- a/gcc/cp/constexpr.cc +++ b/gcc/cp/constexpr.cc @@ -9363,8 +9363,8 @@ potential_constant_expression_1 (tree t, bool want_rval, bool strict, bool now, case GOTO_EXPR: { tree *target = &TREE_OPERAND (t, 0); - /* Gotos representing break and continue are OK. */ - if (breaks (target) || continues (target)) + /* Gotos representing break, continue and cdtor return are OK. */ + if (breaks (target) || continues (target) || returns (target)) { *jump_target = *target; return true; |