[PATCH] Fix IPA-SRA function type cloning
Richard Guenther
rguenther@suse.de
Fri Jul 30 10:01:00 GMT 2010
We can't use copy_node, that copies TYPE_POINTER_TO chains which
causes wrong pointer types for the new call exprs.
Bootstrapped and tested on x86_64-unknown-linux-gnu, applied.
Richard.
2010-07-30 Richard Guenther <rguenther@suse.de>
* ipa-prop.c (ipa_modify_formal_parameters): Use
build_distinct_type_copy.
Index: gcc/ipa-prop.c
===================================================================
*** gcc/ipa-prop.c (revision 162680)
--- gcc/ipa-prop.c (working copy)
*************** ipa_modify_formal_parameters (tree fndec
*** 2077,2083 ****
|| (VEC_index (ipa_parm_adjustment_t, adjustments, 0)->copy_param
&& VEC_index (ipa_parm_adjustment_t, adjustments, 0)->base_index == 0))
{
! new_type = copy_node (orig_type);
TYPE_ARG_TYPES (new_type) = new_reversed;
}
else
--- 2077,2083 ----
|| (VEC_index (ipa_parm_adjustment_t, adjustments, 0)->copy_param
&& VEC_index (ipa_parm_adjustment_t, adjustments, 0)->base_index == 0))
{
! new_type = build_distinct_type_copy (orig_type);
TYPE_ARG_TYPES (new_type) = new_reversed;
}
else
More information about the Gcc-patches
mailing list