From 30355eaac82aa043fbbc8ae64d8bd962aa66c9ab Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Thu, 9 Nov 2000 16:12:01 -0800 Subject: [PATCH] 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 --- gcc/ChangeLog | 5 +++++ gcc/fold-const.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 620f8fb48f4..428ce0a0b21 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 da27f470f1e..f5b26993f4c 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); -- 2.30.2