public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r13-7863] ada: Add missing guards in Selected_Range_Checks
@ 2023-09-27  8:24 Eric Botcazou
  0 siblings, 0 replies; only message in thread
From: Eric Botcazou @ 2023-09-27  8:24 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:26aa5c144c17e6b40b6277ecccdbecae57e2d96d

commit r13-7863-g26aa5c144c17e6b40b6277ecccdbecae57e2d96d
Author: Eric Botcazou <ebotcazou@adacore.com>
Date:   Tue Mar 14 12:42:53 2023 +0100

    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.

Diff:
---
 gcc/ada/checks.adb | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/gcc/ada/checks.adb b/gcc/ada/checks.adb
index e21f3065cb1..ca6fe42d967 100644
--- a/gcc/ada/checks.adb
+++ b/gcc/ada/checks.adb
@@ -10815,6 +10815,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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-09-27  8:24 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-27  8:24 [gcc r13-7863] ada: Add missing guards in Selected_Range_Checks Eric Botcazou

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).