diff options
author | Jason Merrill <jason@redhat.com> | 2018-09-08 12:00:02 -0400 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2018-09-08 12:00:02 -0400 |
commit | 3075affdbcb3232fe549fbeed87bd94114c14758 (patch) | |
tree | 86657620d81c1d04427d724399e476545acab7d9 /gcc/tree-vrp.c | |
parent | 61856507f42eef2a1474d4b629ed7db641b48a4f (diff) | |
download | gcc-3075affdbcb3232fe549fbeed87bd94114c14758.zip gcc-3075affdbcb3232fe549fbeed87bd94114c14758.tar.gz gcc-3075affdbcb3232fe549fbeed87bd94114c14758.tar.bz2 |
PR c++/86678 - constexpr function with non-constant after return.
In this testcase, the call to f() can never be a constant
expression, but that's not a problem because it isn't always
reached by calls to g. We were wrongly rejecting this because
potential_constant_expression_1 lacked the jump tracking that
cxx_eval_constant_expression has. So this patch adds a simpler
version of that tracking.
* constexpr.c (potential_constant_expression_1): Add jump_target.
(breaks): Check for BREAK_STMT.
(continues): Check for CONTINUE_STMT.
From-SVN: r264171
Diffstat (limited to 'gcc/tree-vrp.c')
0 files changed, 0 insertions, 0 deletions