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 decl_function_context.


Hi,

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

Kazu Hirata

2006-07-11  Kazu Hirata  <kazu@codesourcery.com>

	* tree.c (decl_function_context): Use nth_parm_type.

Index: tree.c
===================================================================
--- tree.c	(revision 115203)
+++ tree.c	(working copy)
@@ -5751,7 +5751,7 @@ decl_function_context (tree decl)
   else if (TREE_CODE (decl) == FUNCTION_DECL && DECL_VINDEX (decl))
     context
       = TYPE_MAIN_VARIANT
-	(TREE_TYPE (TREE_VALUE (TYPE_ARG_TYPES (TREE_TYPE (decl)))));
+	(TREE_TYPE (nth_parm_type (TYPE_ARG_TYPES (TREE_TYPE (decl)), 0)));
   else
     context = DECL_CONTEXT (decl);
 


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