aboutsummaryrefslogtreecommitdiff
path: root/gcc/fold-const.c
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>2000-11-09 16:12:01 -0800
committerRichard Henderson <rth@gcc.gnu.org>2000-11-09 16:12:01 -0800
commit30355eaac82aa043fbbc8ae64d8bd962aa66c9ab (patch)
tree7b154cfb8c329ba9830089d1fc85b59e76e64883 /gcc/fold-const.c
parent5fcee6f34e656a16a743bf5ecb32b65bbc6fbbae (diff)
downloadgcc-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
Diffstat (limited to 'gcc/fold-const.c')
-rw-r--r--gcc/fold-const.c2
1 files changed, 1 insertions, 1 deletions
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);