When materializing a cloned function with arguments removed,

to TYPE_POINTER_TO field of the new type (which has fewer
arguments) was left pointing to the original type.

From-SVN: r161918
This commit is contained in:
Duncan Sands 2010-07-07 17:21:16 +02:00 committed by Duncan Sands
parent ab33bd5ceb
commit f625098e0c
2 changed files with 7 additions and 1 deletions

View 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

View 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