https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89785

--- Comment #10 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Author: jakub
Date: Thu Mar 28 14:47:47 2019
New Revision: 269995

URL: https://gcc.gnu.org/viewcvs?rev=269995&root=gcc&view=rev
Log:
        PR c++/89785
        * constexpr.c (struct check_for_return_continue_data): New type.
        (check_for_return_continue): New function.
        (potential_constant_expression_1) <case SWITCH_STMT>: Walk
        SWITCH_STMT_BODY to find RETURN_EXPRs or CONTINUE_STMTs not nested
        in loop bodies and set *jump_target to that if found.

        * g++.dg/cpp1y/constexpr-89785-1.C: New test.
        * g++.dg/cpp1y/constexpr-89785-2.C: New test.

Added:
    trunk/gcc/testsuite/g++.dg/cpp1y/constexpr-89785-1.C
    trunk/gcc/testsuite/g++.dg/cpp1y/constexpr-89785-2.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/constexpr.c
    trunk/gcc/testsuite/ChangeLog

Reply via email to