Commit de37b21e by Paolo Carlini Committed by Paolo Carlini

re PR c++/58614 ([c++11] ICE with undeclared variable in initializer list)

/cp
2015-01-16  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/58614
	* pt.c (unify): When BRACE_ENCLOSED_INITIALIZER_P (arg), handle
	TREE_TYPE (elt) == error_mark_node.

/testsuite
2015-01-16  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/58614
	* g++.dg/cpp0x/auto44.C: New.

From-SVN: r219716
parent e1872645
2015-01-16 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/58614
* pt.c (unify): When BRACE_ENCLOSED_INITIALIZER_P (arg), handle
TREE_TYPE (elt) == error_mark_node.
2015-01-15 Jan Hubicka <hubicka@ucw.cz>
PR tree-optimization/62053
......
......@@ -17875,6 +17875,8 @@ unify (tree tparms, tree targs, tree parm, tree arg, int strict,
if (!BRACE_ENCLOSED_INITIALIZER_P (elt))
{
tree type = TREE_TYPE (elt);
if (type == error_mark_node)
return unify_invalid (explain_p);
/* It should only be possible to get here for a call. */
gcc_assert (elt_strict & UNIFY_ALLOW_OUTER_LEVEL);
elt_strict |= maybe_adjust_types_for_deduction
......
2015-01-16 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/58614
* g++.dg/cpp0x/auto44.C: New.
2015-01-15 Sandra Loosemore <sandra@codesourcery.com>
PR target/59710
......
// PR c++/58614
// { dg-do compile { target c++11 } }
#include <initializer_list>
void foo()
{
i; // { dg-error "not declared" }
auto j = { i }; // { dg-error "unable to deduce" }
}
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