When I got rid of the inreg attribute for static chain parameters,
I simply deleted the attribute adding code while I should have pushed
a attribute of "none" - this results in attributes for other parameters
being applied to the wrong parameters (off by one).  Fixed by the attached
patch.

Ciao,

Duncan.
Index: gcc.llvm.master/gcc/llvm-types.cpp
===================================================================
--- gcc.llvm.master.orig/gcc/llvm-types.cpp	2007-06-09 14:26:36.000000000 +0200
+++ gcc.llvm.master/gcc/llvm-types.cpp	2007-06-09 15:15:14.000000000 +0200
@@ -1024,7 +1024,11 @@
     PAWI.index = Idx++; PAWI.attrs = ParamAttr::StructRet;
     Attrs.push_back(PAWI);
   }
-  
+
+  if (static_chain)
+    // Skip over the static chain.
+    Idx++;
+
   for (tree Args = TYPE_ARG_TYPES(type);
        Args && TREE_VALUE(Args) != void_type_node; Args = TREE_CHAIN(Args)) {
     tree Ty = TREE_VALUE(Args);
_______________________________________________
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits

Reply via email to