--- gcc/config/convex/convex.c 2018/04/24 18:10:25 1.1 +++ gcc/config/convex/convex.c 2018/04/24 18:29:07 1.1.1.3 @@ -1,5 +1,5 @@ /* Subroutines for insn-output.c for Convex. - Copyright (C) 1988, 1993 Free Software Foundation, Inc. + Copyright (C) 1988, 1993, 1994 Free Software Foundation, Inc. This file is part of GNU CC. @@ -15,7 +15,8 @@ GNU General Public License for more deta You should have received a copy of the GNU General Public License along with GNU CC; see the file COPYING. If not, write to -the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ +the Free Software Foundation, 59 Temple Place - Suite 330, +Boston, MA 02111-1307, USA. */ #include "config.h" #include "tree.h" @@ -413,31 +414,40 @@ expand_movstr_call (operands) #define MIN_FLOAT 2.9387358770557188e-39 #endif -void -check_float_value (mode, dp) +int +check_float_value (mode, dp, overflow) enum machine_mode mode; REAL_VALUE_TYPE *dp; + int overflow; { REAL_VALUE_TYPE d = *dp; + if (overflow) + { + *dp = MAX_FLOAT; + return 1; + } + if (mode == SFmode) { if (d > MAX_FLOAT) { - error ("magnitude of constant too large for `float'"); *dp = MAX_FLOAT; + return 1; } else if (d < -MAX_FLOAT) { - error ("magnitude of constant too large for `float'"); *dp = -MAX_FLOAT; + return 1; } else if ((d > 0 && d < MIN_FLOAT) || (d < 0 && d > -MIN_FLOAT)) { - warning ("`float' constant truncated to zero"); *dp = 0.0; + return 1; } } + + return 0; } /* Output the label at the start of a function.