aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/checks.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2017-09-08 11:38:48 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2017-09-08 11:38:48 +0200
commit3815f967f9fa3655ee4e9cdc44d6292e09f411de (patch)
tree7019b196e6d5c8513a426a8b9ba493eb506f4f11 /gcc/ada/checks.adb
parenta481c9b40f0de76bf9e86b9aba7c1fe66cd7add0 (diff)
downloadgcc-3815f967f9fa3655ee4e9cdc44d6292e09f411de.zip
gcc-3815f967f9fa3655ee4e9cdc44d6292e09f411de.tar.gz
gcc-3815f967f9fa3655ee4e9cdc44d6292e09f411de.tar.bz2
[multiple changes]
2017-09-08 Bob Duff <duff@adacore.com> * s-trasym.ads (Hexa_Traceback): If Suppress_Hex is True, print "..." instead of a hexadecimal address. * s-trasym.adb: Ignore No_Hex in this version. Misc cleanup. 2017-09-08 Bob Duff <duff@adacore.com> * debug.adb: Minor reformatting. 2017-09-08 Bob Duff <duff@adacore.com> * a-cbdlli.adb, a-cohama.adb, a-cohase.adb (Copy): Rewrite the code so it doesn't trigger an "uninit var" warning. 2017-09-08 Nicolas Roche <roche@adacore.com> * s-hibaen.ads: Remove obsolete file. 2017-09-08 Arnaud Charlet <charlet@adacore.com> * a-locale.ads: Add comment explaining the state of this package. 2017-09-08 Arnaud Charlet <charlet@adacore.com> * sem_util.adb (Is_CCT_Instance): Allow calls in the context of packages. * sem_prag.ads, sem_prag.adb (Find_Related_Declaration_Or_Body): allow calls in the context of package spec (for pragma Initializes) and bodies (for pragma Refined_State). 2017-09-08 Bob Duff <duff@adacore.com> * checks.adb (Insert_Valid_Check): Copy the Do_Range_Check flag to the new Exp. From-SVN: r251875
Diffstat (limited to 'gcc/ada/checks.adb')
-rw-r--r--gcc/ada/checks.adb8
1 files changed, 7 insertions, 1 deletions
diff --git a/gcc/ada/checks.adb b/gcc/ada/checks.adb
index 7962b7b..8dd7a39 100644
--- a/gcc/ada/checks.adb
+++ b/gcc/ada/checks.adb
@@ -7401,10 +7401,16 @@ package body Checks is
Suppress => Validity_Check);
Set_Validated_Object (Var_Id, New_Copy_Tree (Exp));
-
Rewrite (Exp, New_Occurrence_Of (Var_Id, Loc));
PV := New_Occurrence_Of (Var_Id, Loc);
+ -- Copy the Do_Range_Check flag over to the new Exp, so it doesn't
+ -- get lost. Floating point types are handled elsewhere.
+
+ if not Is_Floating_Point_Type (Typ) then
+ Set_Do_Range_Check (Exp, Do_Range_Check (Original_Node (Exp)));
+ end if;
+
-- Otherwise the expression does not denote a variable. Force its
-- evaluation by capturing its value in a constant. Generate: