From: Richard Guenther Date: Sat, 5 Sep 2009 15:14:12 +0000 (+0000) Subject: re PR tree-optimization/41271 (FAIL: gcc.dg/matrix/matrix-2.c scan-ipa-dump-times... X-Git-Tag: releases/gcc-4.5.0~3661 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=575140c2f29ee35893f4551ca20f15a587c1727b;p=thirdparty%2Fgcc.git re PR tree-optimization/41271 (FAIL: gcc.dg/matrix/matrix-2.c scan-ipa-dump-times matrix-reorg "Flattened 2 dimensions" 1) 2009-09-05 Richard Guenther PR middle-end/41271 * tree-ssa.c (useless_type_conversion_p): Drop qualifiers before comparing function argument types. From-SVN: r151453 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 09f480501ade..a8c927f7d3a7 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2009-09-05 Richard Guenther + + PR middle-end/41271 + * tree-ssa.c (useless_type_conversion_p): Drop qualifiers + before comparing function argument types. + 2009-09-05 Francois-Xavier Coudert PR target/41024 diff --git a/gcc/tree-ssa.c b/gcc/tree-ssa.c index db707fb35a9c..0ff4733f5456 100644 --- a/gcc/tree-ssa.c +++ b/gcc/tree-ssa.c @@ -1289,7 +1289,8 @@ useless_type_conversion_p (tree outer_type, tree inner_type) 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; @@ -1298,8 +1299,9 @@ useless_type_conversion_p (tree outer_type, tree inner_type) 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