[lto] Stop using TREE_CHAIN on TYPE_ARG_TYPES in arg_assoc_args.

Kazu Hirata kazu@codesourcery.com
Sat Jun 24 16:57:00 GMT 2006


Hi,

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

Kazu Hirata

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

	* name-lookup.c (arg_assoc_args): Use num_parm_types and
	nth_parm_type.

Index: cp/name-lookup.c
===================================================================
--- cp/name-lookup.c	(revision 114740)
+++ cp/name-lookup.c	(working copy)
@@ -4544,8 +4544,11 @@ arg_assoc_type (struct arg_lookup *k, tr
 static bool
 arg_assoc_args (struct arg_lookup *k, tree args)
 {
-  for (; args; args = TREE_CHAIN (args))
-    if (arg_assoc (k, TREE_VALUE (args)))
+  int len = num_parm_types (args);
+  int i;
+
+  for (i = 0; i < len; i++)
+    if (arg_assoc (k, nth_parm_type (args, i)))
       return true;
   return false;
 }



More information about the Gcc-patches mailing list