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
This commit is contained in:
parent
e187264505
commit
de37b21e3d
@ -1,3 +1,9 @@
|
||||
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
|
||||
|
@ -1,3 +1,8 @@
|
||||
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
|
||||
|
10
gcc/testsuite/g++.dg/cpp0x/auto44.C
Normal file
10
gcc/testsuite/g++.dg/cpp0x/auto44.C
Normal file
@ -0,0 +1,10 @@
|
||||
// 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" }
|
||||
}
|
Loading…
Reference in New Issue
Block a user