public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r14-5905] ada: Handle unchecked conversion in bound
@ 2023-11-28  9:37 Marc Poulhi?s
  0 siblings, 0 replies; only message in thread
From: Marc Poulhi?s @ 2023-11-28  9:37 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:89ed5455850437782358e0b3fb399bb5d4ec5f65

commit r14-5905-g89ed5455850437782358e0b3fb399bb5d4ec5f65
Author: Richard Kenner <kenner@adacore.com>
Date:   Fri Nov 3 18:04:59 2023 -0400

    ada: Handle unchecked conversion in bound
    
    Look through both unchecked and normal conversions when seeing if any
    part of a bound is uplevel.
    
    gcc/ada/
    
            * exp_unst.adb (Note_Uplevel_Bound): Treat
            N_Unchecked_Type_Conversion like N_Type_Conversion.

Diff:
---
 gcc/ada/exp_unst.adb | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/gcc/ada/exp_unst.adb b/gcc/ada/exp_unst.adb
index b01cfc13bf9..7acb0656262 100644
--- a/gcc/ada/exp_unst.adb
+++ b/gcc/ada/exp_unst.adb
@@ -643,7 +643,9 @@ package body Exp_Unst is
 
                   --  Conversion case
 
-                  elsif Nkind (N) = N_Type_Conversion then
+                  elsif Nkind (N) in
+                          N_Type_Conversion | N_Unchecked_Type_Conversion
+                  then
                      Note_Uplevel_Bound (Expression (N), Ref);
                   end if;
                end Note_Uplevel_Bound;

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

only message in thread, other threads:[~2023-11-28  9:37 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-28  9:37 [gcc r14-5905] ada: Handle unchecked conversion in bound Marc Poulhi?s

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).