diff options
author | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-07-04 18:11:59 +0000 |
---|---|---|
committer | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-07-04 18:11:59 +0000 |
commit | 642bf8552e63b77ad8f9d2e9186e68a37a7ff4ae (patch) | |
tree | f0e0821e28c106f235e4a462ab009b20dd1cf42c | |
parent | 6f26f77a7b39e97f4ebd9a54fa711892c06bc128 (diff) |
PR c++/40619
* tree.c (cp_tree_equal) [PARM_DECL]: Don't check parm index.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_4-branch@149240 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/cp/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/cp/tree.c | 3 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/cpp0x/auto16.C | 7 |
3 files changed, 13 insertions, 2 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 02a8c0ef5d8..325066ae94c 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2009-07-04 Jason Merrill <jason@redhat.com> + + PR c++/40619 + * tree.c (cp_tree_equal) [PARM_DECL]: Don't check parm index. + 2009-06-30 Jason Merrill <jason@redhat.com> PR c++/40595 diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c index b4b977ef1a9..b1a65b05218 100644 --- a/gcc/cp/tree.c +++ b/gcc/cp/tree.c @@ -1880,8 +1880,7 @@ cp_tree_equal (tree t1, tree t2) 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)) - && parm_index (t1) == parm_index (t2)) + if (same_type_p (TREE_TYPE (t1), TREE_TYPE (t2))) return true; else return false; diff --git a/gcc/testsuite/g++.dg/cpp0x/auto16.C b/gcc/testsuite/g++.dg/cpp0x/auto16.C new file mode 100644 index 00000000000..1b4ae8f82b2 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/auto16.C @@ -0,0 +1,7 @@ +// PR c++/40619 +// { dg-options "-std=c++0x" } + +template<typename U> struct X {}; + +template<typename T> auto f(T t) -> X<decltype(t+1)> {} +template<typename T> auto g(T t) -> X<decltype(t+1)> {} |