From: rth Date: Fri, 10 Nov 2000 00:12:01 +0000 (+0000) Subject: * fold-const.c (fold): Compare TYPE_MAIN_VARIANT rather than X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0c9a39fecb33a02c1ab98a5ded505d03fe2aeedb;p=thirdparty%2Fgcc.git * fold-const.c (fold): Compare TYPE_MAIN_VARIANT rather than the types themselves to discover type equivalence. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@37354 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 620f8fb48f41..428ce0a0b21f 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2000-11-09 Richard Henderson + + * fold-const.c (fold): Compare TYPE_MAIN_VARIANT rather than + the types themselves to discover type equivalence. + 2000-11-09 Mike Stump * Makefile.in (distclean): Remove a few extra leftovers. diff --git a/gcc/fold-const.c b/gcc/fold-const.c index da27f470f1e0..f5b26993f4c4 100644 --- a/gcc/fold-const.c +++ b/gcc/fold-const.c @@ -5099,7 +5099,7 @@ fold (expr) handled below, if we are converting something to its own type via an object of identical or wider precision, neither conversion is needed. */ - if (inside_type == final_type + if (TYPE_MAIN_VARIANT (inside_type) == TYPE_MAIN_VARIANT (final_type) && ((inter_int && final_int) || (inter_float && final_float)) && inter_prec >= final_prec) return TREE_OPERAND (TREE_OPERAND (t, 0), 0);