]> gcc.gnu.org Git - gcc.git/commitdiff
When materializing a cloned function with arguments removed,
authorDuncan Sands <baldrick@free.fr>
Wed, 7 Jul 2010 15:21:16 +0000 (17:21 +0200)
committerDuncan Sands <baldrick@gcc.gnu.org>
Wed, 7 Jul 2010 15:21:16 +0000 (15:21 +0000)
to TYPE_POINTER_TO field of the new type (which has fewer
arguments) was left pointing to the original type.

From-SVN: r161918

gcc/ChangeLog
gcc/tree.c

index bd9cf806918e68c87b33d0851e72aac8ae19a308..3a2fcf485d8009fafd1aec46ca5ece121beb4541 100644 (file)
@@ -1,3 +1,9 @@
+2010-07-07  Duncan Sands  <baldrick@free.fr>
+
+       PR middle-end/41355
+       * tree.c (build_function_type_skip_args): Copy the original type using
+        build_distinct_type_copy rather than copy_node.
+
 2010-07-07  H.J. Lu  <hongjiu.lu@intel.com>
 
        PR target/44850
index dda9287a190c71e5b1d0bcfed4c6405a97cd2f13..2ddd1d87fe41df1d103bbd90892901d2d21a3124 100644 (file)
@@ -7350,7 +7350,7 @@ build_function_type_skip_args (tree orig_type, bitmap args_to_skip)
   if (TREE_CODE (orig_type) != METHOD_TYPE
       || !bitmap_bit_p (args_to_skip, 0))
     {
-      new_type = copy_node (orig_type);
+      new_type = build_distinct_type_copy (orig_type);
       TYPE_ARG_TYPES (new_type) = new_reversed;
     }
   else
This page took 0.091269 seconds and 5 git commands to generate.