+2009-09-05 Richard Guenther <rguenther@suse.de>
+
+ PR middle-end/41271
+ * tree-ssa.c (useless_type_conversion_p): Drop qualifiers
+ before comparing function argument types.
+
2009-09-05 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
PR target/41024
if (!TYPE_ARG_TYPES (outer_type))
return true;
- /* If the argument types are compatible the conversion is useless. */
+ /* If the unqualified argument types are compatible the conversion
+ is useless. */
if (TYPE_ARG_TYPES (outer_type) == TYPE_ARG_TYPES (inner_type))
return true;
outer_parm && inner_parm;
outer_parm = TREE_CHAIN (outer_parm),
inner_parm = TREE_CHAIN (inner_parm))
- if (!useless_type_conversion_p (TREE_VALUE (outer_parm),
- TREE_VALUE (inner_parm)))
+ if (!useless_type_conversion_p
+ (TYPE_MAIN_VARIANT (TREE_VALUE (outer_parm)),
+ TYPE_MAIN_VARIANT (TREE_VALUE (inner_parm))))
return false;
/* If there is a mismatch in the number of arguments the functions