Commit bae14a37 by Dodji Seketeli Committed by Dodji Seketeli

re PR c++/48574 (ICE)

Fix PR c++/48574

gcc/cp/

	PR c++/48574
	* class.c (fixed_type_or_null): Use type_dependent_p_push to test
	if the instance has a dependent initializer.

gcc/testsuite/

	PR c++/48574
	* g++.dg/template/dependent-expr8.C: New test case.

From-SVN: r173570
parent fb55d62e
2011-05-09 Dodji Seketeli <dodji@redhat.com>
PR c++/48574
* class.c (fixed_type_or_null): Use type_dependent_p_push to test
if the instance has a dependent initializer.
2011-05-08 Paolo Carlini <paolo.carlini@oracle.com> 2011-05-08 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/48816 PR c++/48816
......
...@@ -5939,7 +5939,7 @@ fixed_type_or_null (tree instance, int *nonnull, int *cdtorp) ...@@ -5939,7 +5939,7 @@ fixed_type_or_null (tree instance, int *nonnull, int *cdtorp)
itself. */ itself. */
if (TREE_CODE (instance) == VAR_DECL if (TREE_CODE (instance) == VAR_DECL
&& DECL_INITIAL (instance) && DECL_INITIAL (instance)
&& !type_dependent_expression_p (DECL_INITIAL (instance)) && !type_dependent_expression_p_push (DECL_INITIAL (instance))
&& !htab_find (ht, instance)) && !htab_find (ht, instance))
{ {
tree type; tree type;
......
2011-05-09 Dodji Seketeli <dodji@redhat.com>
PR c++/48574
* g++.dg/template/dependent-expr8.C: New test case.
2011-05-07 Zdenek Dvorak <ook@ucw.cz> 2011-05-07 Zdenek Dvorak <ook@ucw.cz>
PR tree-optimization/48837 PR tree-optimization/48837
......
// Origin PR c++/48574
// { dg-options "-std=c++0x" }
// { dg-do compile }
struct A
{
virtual int foo();
};
void baz (int);
template <typename T>
void
bar(T x)
{
A &b = *x;
baz (b.foo ());
}
void
foo()
{
A a;
bar(&a);
}
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