diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2023-03-14 12:42:53 +0100 |
---|---|---|
committer | Marc Poulhiès <poulhies@adacore.com> | 2023-05-26 09:29:15 +0200 |
commit | 0251292d2da4039d4b12ecee81588614bf99b546 (patch) | |
tree | 2ef4e11a602c2ed56f781b0e1d7a0b1262712f1f | |
parent | da7b4b08f13b89752941f51651dcd5109d9be925 (diff) | |
download | gcc-0251292d2da4039d4b12ecee81588614bf99b546.zip gcc-0251292d2da4039d4b12ecee81588614bf99b546.tar.gz gcc-0251292d2da4039d4b12ecee81588614bf99b546.tar.bz2 |
ada: Add missing guards in Selected_Range_Checks
gcc/ada/
* checks.adb (Selected_Range_Checks): Add guards to protect calls
to Expr_Value on bounds.
-rw-r--r-- | gcc/ada/checks.adb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/ada/checks.adb b/gcc/ada/checks.adb index 0d47296..6525982 100644 --- a/gcc/ada/checks.adb +++ b/gcc/ada/checks.adb @@ -10826,6 +10826,8 @@ package body Checks is if not Check_Added and then Is_Fixed_Lower_Bound_Index_Subtype (T_Typ) + and then Known_LB + and then Known_T_LB and then Expr_Value (LB) /= Expr_Value (T_LB) then Add_Check |