Commit 5a5e54cd by Kai Tietz Committed by Kai Tietz

re PR c++/63996 (Infinite loop in invalid C++14 constexpr fn)

	PR c++/63996
	* constexpr.c (cxx_eval_loop_expr): Don't loop
	endless on none-constant expression.

From-SVN: r218682
parent 32b671f0
2014-12-12 Kai Tietz <ktietz@redhat.com>
PR c++/63996
* constexpr.c (cxx_eval_loop_expr): Don't loop
endless on none-constant expression.
2014-12-12 Jason Merrill <jason@redhat.com>
PR c++/61402
......
......@@ -2841,7 +2841,7 @@ cxx_eval_loop_expr (const constexpr_ctx *ctx, tree t,
{
cxx_eval_statement_list (ctx, body,
non_constant_p, overflow_p, jump_target);
if (returns (jump_target) || breaks (jump_target))
if (returns (jump_target) || breaks (jump_target) || *non_constant_p)
break;
}
if (breaks (jump_target))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment