diff options
author | Richard Henderson <rth@redhat.com> | 2000-11-09 16:12:01 -0800 |
---|---|---|
committer | Richard Henderson <rth@gcc.gnu.org> | 2000-11-09 16:12:01 -0800 |
commit | 30355eaac82aa043fbbc8ae64d8bd962aa66c9ab (patch) | |
tree | 7b154cfb8c329ba9830089d1fc85b59e76e64883 | |
parent | 5fcee6f34e656a16a743bf5ecb32b65bbc6fbbae (diff) | |
download | gcc-30355eaac82aa043fbbc8ae64d8bd962aa66c9ab.zip gcc-30355eaac82aa043fbbc8ae64d8bd962aa66c9ab.tar.gz gcc-30355eaac82aa043fbbc8ae64d8bd962aa66c9ab.tar.bz2 |
fold-const.c (fold): Compare TYPE_MAIN_VARIANT rather than the types themselves to discover type...
* fold-const.c (fold): Compare TYPE_MAIN_VARIANT rather than
the types themselves to discover type equivalence.
From-SVN: r37354
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/fold-const.c | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 620f8fb..428ce0a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -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. diff --git a/gcc/fold-const.c b/gcc/fold-const.c index da27f47..f5b2699 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); |