Commit bd8f5bb2 by Marek Polacek Committed by Marek Polacek

re PR c++/68449 (ICE in cxx_eval_constant_expression on atomic_load in C++)

	PR c++/68449
	* constexpr.c (cxx_eval_constant_expression): Handle NULL initializer.

	* g++.dg/pr68449.C: New.

From-SVN: r232176
parent bb0f5ca7
2016-01-08 Marek Polacek <polacek@redhat.com>
PR c++/68449
* constexpr.c (cxx_eval_constant_expression): Handle NULL initializer.
2016-01-08 Jason Merrill <jason@redhat.com>
* constexpr.c (cxx_eval_call_expression): Remove convert_to_void
......
......@@ -3184,7 +3184,8 @@ cxx_eval_constant_expression (const constexpr_ctx *ctx, tree t,
r = TARGET_EXPR_INITIAL (r);
if (VAR_P (r))
if (tree *p = ctx->values->get (r))
r = *p;
if (*p != NULL_TREE)
r = *p;
if (DECL_P (r))
{
if (!ctx->quiet)
......
2016-01-08 Marek Polacek <polacek@redhat.com>
PR c++/68449
* g++.dg/pr68449.C: New.
2016-01-08 Alan Lawrence <alan.lawrence@arm.com>
PR tree-optimization/68707
......
// PR c++/68449
// { dg-do compile }
// { dg-options "-Wsign-compare" }
int
foo (int a)
{
return __extension__ ({ int b; b; }) < 0;
}
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