trans.c (convert_with_check): Fix typo in the condition guarding the overflow check...
authorEric Botcazou <ebotcazou@adacore.com>
Tue, 6 Mar 2018 12:21:27 +0000 (12:21 +0000)
committerEric Botcazou <ebotcazou@gcc.gnu.org>
Tue, 6 Mar 2018 12:21:27 +0000 (12:21 +0000)
* gcc-interface/trans.c (convert_with_check): Fix typo in the condition
guarding the overflow check emitted for the upper bound of a floating-
point conversion.

From-SVN: r258277

gcc/ada/ChangeLog
gcc/ada/gcc-interface/decl.c
gcc/ada/gcc-interface/trans.c

index 195f94e251f9c2f1e27863e6f9cd23381cb4631a..3de821f12b1594323bbf1c2e77519b6385ce98c7 100644 (file)
@@ -1,3 +1,9 @@
+2018-03-06  Eric Botcazou  <ebotcazou@adacore.com>
+
+       * gcc-interface/trans.c (convert_with_check): Fix typo in the condition
+       guarding the overflow check emitted for the upper bound of a floating-
+       point conversion.
+
 2018-03-06  Eric Botcazou  <ebotcazou@adacore.com>
 
        * gcc-interface/utils.c (def_builtin_1): Bail out on error_mark_node.
index e0466f349c32b1c5cbdfc8a949d3b2870db7a4ad..7a827b742d89476250360fe8b7242b37f70b3094 100644 (file)
@@ -6,7 +6,7 @@
  *                                                                          *
  *                          C Implementation File                           *
  *                                                                          *
- *          Copyright (C) 1992-2017, Free Software Foundation, Inc.         *
+ *          Copyright (C) 1992-2018, Free Software Foundation, Inc.         *
  *                                                                          *
  * GNAT is free software;  you can  redistribute it  and/or modify it under *
  * terms of the  GNU General Public License as published  by the Free Soft- *
index 587063b6e7735decb8008e9da115ebb22640a37f..ac80a3e0e8ecbbb960fa20b13d5fc6aa2ff9a9dd 100644 (file)
@@ -6,7 +6,7 @@
  *                                                                          *
  *                          C Implementation File                           *
  *                                                                          *
- *          Copyright (C) 1992-2017, Free Software Foundation, Inc.         *
+ *          Copyright (C) 1992-2018, Free Software Foundation, Inc.         *
  *                                                                          *
  * GNAT is free software;  you can  redistribute it  and/or modify it under *
  * terms of the  GNU General Public License as published  by the Free Soft- *
@@ -9381,7 +9381,7 @@ convert_with_check (Entity_Id gnat_type, tree gnu_expr, bool overflow_p,
          ? tree_int_cst_lt (gnu_out_ub, gnu_in_ub)
          : (FLOAT_TYPE_P (gnu_base_type)
             ? real_less (&TREE_REAL_CST (gnu_out_ub),
-                         &TREE_REAL_CST (gnu_in_lb))
+                         &TREE_REAL_CST (gnu_in_ub))
             : 1))
        gnu_cond
          = build_binary_op (TRUTH_ORIF_EXPR, boolean_type_node, gnu_cond,