]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
* fold-const.c (fold): Compare TYPE_MAIN_VARIANT rather than
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 10 Nov 2000 00:12:01 +0000 (00:12 +0000)
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 10 Nov 2000 00:12:01 +0000 (00:12 +0000)
        the types themselves to discover type equivalence.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@37354 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/fold-const.c

index 620f8fb48f419819b672ce6510b5477ddca3f2b8..428ce0a0b21ff493a6871973fa5d88e90cdea7ac 100644 (file)
@@ -1,3 +1,8 @@
+2000-11-09  Richard Henderson  <rth@redhat.com>
+
+       * fold-const.c (fold): Compare TYPE_MAIN_VARIANT rather than
+       the types themselves to discover type equivalence.
+
 2000-11-09  Mike Stump  <mrs@wrs.com>
 
        * Makefile.in (distclean): Remove a few extra leftovers.
index da27f470f1e0cec632fe6c2461c317084c9fba4f..f5b26993f4c4b2718f87d89f99ac305b47da8e03 100644 (file)
@@ -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);