This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[lto] Use nth_parm_type in unify.


Hi,

Tested on x86_64-pc-linux-gnu.  Committed to the LTO branch as
obvious.

Kazu Hirata

2006-06-29  Kazu Hirata  <kazu@codesourcery.com>

	* pt.c (unify): Use nth_parm_type.

Index: cp/pt.c
===================================================================
--- cp/pt.c	(revision 114740)
+++ cp/pt.c	(working copy)
@@ -10417,8 +10417,8 @@ unify (tree tparms, tree targs, tree par
       if (TREE_CODE (parm) == METHOD_TYPE
 	  && (!check_cv_quals_for_unify
 	      (UNIFY_ALLOW_NONE,
-	       TREE_TYPE (TREE_VALUE (TYPE_ARG_TYPES (arg))),
-	       TREE_TYPE (TREE_VALUE (TYPE_ARG_TYPES (parm))))))
+	       TREE_TYPE (nth_parm_type (TYPE_ARG_TYPES (arg), 0)),
+	       TREE_TYPE (nth_parm_type (TYPE_ARG_TYPES (parm), 0)))))
 	return 1;
 
       if (unify (tparms, targs, TREE_TYPE (parm),
@@ -10455,7 +10455,7 @@ unify (tree tparms, tree targs, tree par
 	     implicit object parameter and place them on the function
 	     type to be restored later. */
 	  cv_quals =
-	    cp_type_quals(TREE_TYPE (TREE_VALUE (TYPE_ARG_TYPES (method_type))));
+	    cp_type_quals(TREE_TYPE (nth_parm_type (TYPE_ARG_TYPES (method_type), 0)));
 	  fntype = build_qualified_type (fntype, cv_quals);
 	  return unify (tparms, targs, TREE_TYPE (parm), fntype, strict);
 	}


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]