+2011-02-26 Jason Merrill <jason@redhat.com>
+
+ PR c++/47904
+ * tree.c (cp_tree_equal) [PARM_DECL]: Don't crash on
+ DECL_ARTIFICIAL parms.
+
2010-12-16 Release Manager
* GCC 4.5.2 released.
case PARM_DECL:
/* For comparing uses of parameters in late-specified return types
- with an out-of-class definition of the function. */
- if (same_type_p (TREE_TYPE (t1), TREE_TYPE (t2))
- && DECL_PARM_INDEX (t1) == DECL_PARM_INDEX (t2))
- return true;
- else
- return false;
+ with an out-of-class definition of the function, but can also come
+ up for expressions that involve 'this' in a member function
+ template. */
+ if (same_type_p (TREE_TYPE (t1), TREE_TYPE (t2)))
+ {
+ if (DECL_ARTIFICIAL (t1) ^ DECL_ARTIFICIAL (t2))
+ return false;
+ if (DECL_ARTIFICIAL (t1)
+ || DECL_PARM_INDEX (t1) == DECL_PARM_INDEX (t2))
+ return true;
+ }
+ return false;
case VAR_DECL:
case CONST_DECL:
+2011-02-26 Jason Merrill <jason@redhat.com>
+
+ * g++.dg/template/this-targ1.C: New.
+
2011-02-19 Alexandre Oliva <aoliva@redhat.com>
PR tree-optimization/46620