]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
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:50 +0000 (12:21 +0000)
committerEric Botcazou <ebotcazou@gcc.gnu.org>
Tue, 6 Mar 2018 12:21:50 +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: r258279

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

index aca3c23380fe20d4d63337152aebda4a3371320f..67abd8fcf94c398e6ad39caf27d5f8c4c921264a 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.
+
 2017-12-14  Eric Botcazou  <ebotcazou@adacore.com>
 
        * gcc-interface/decl.c (gnat_to_gnu_field): Do not set the alignment
index 8a4924c9f28d45e3bb33eb54c5c02d05ccdf284e..245994181f34e70f9257ba70c45d6a5fc659c1e0 100644 (file)
@@ -9215,7 +9215,7 @@ convert_with_check (Entity_Id gnat_type, tree gnu_expr, bool overflowp,
          ? 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,