This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[lto] Use nth_parm_type in same_signature_p.
- From: Kazu Hirata <kazu at codesourcery dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Sun, 25 Jun 2006 22:35:23 -0700
- Subject: [lto] Use nth_parm_type in same_signature_p.
Hi,
Attached is a patch to use nth_parm_type in same_signature_p.
Tested on x86_64-pc-linux-gnu. Committed to the LTO branch as
obvious.
Kazu Hirata
2006-06-26 Kazu Hirata <kazu@codesourcery.com>
* class.c (same_signature_p): Use nth_parm_type.
Index: cp/class.c
===================================================================
--- cp/class.c (revision 114988)
+++ cp/class.c (working copy)
@@ -1782,8 +1782,8 @@ same_signature_p (tree fndecl, tree base
tree types, base_types;
types = TYPE_ARG_TYPES (TREE_TYPE (fndecl));
base_types = TYPE_ARG_TYPES (TREE_TYPE (base_fndecl));
- if ((TYPE_QUALS (TREE_TYPE (TREE_VALUE (base_types)))
- == TYPE_QUALS (TREE_TYPE (TREE_VALUE (types))))
+ if ((TYPE_QUALS (TREE_TYPE (nth_parm_type (base_types, 0)))
+ == TYPE_QUALS (TREE_TYPE (nth_parm_type (types, 0))))
&& compparms (base_types, 1, types, 1))
return 1;
}