public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [COMMITTED] ada: Fix type for SPARK expansion on deep delta aggregates
@ 2023-11-21 10:00 Marc Poulhiès
  0 siblings, 0 replies; only message in thread
From: Marc Poulhiès @ 2023-11-21 10:00 UTC (permalink / raw)
  To: gcc-patches; +Cc: Yannick Moy

From: Yannick Moy <moy@adacore.com>

gcc/ada/

	* exp_spark.adb (Expand_SPARK_Delta_Or_Aggregate): Fix type.

Tested on x86_64-pc-linux-gnu, committed on master.

---
 gcc/ada/exp_spark.adb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/ada/exp_spark.adb b/gcc/ada/exp_spark.adb
index c19aa201bde..ae0e616c797 100644
--- a/gcc/ada/exp_spark.adb
+++ b/gcc/ada/exp_spark.adb
@@ -200,7 +200,7 @@ package body Exp_SPARK is
       begin
          loop
             if Nkind (Pref) = N_Indexed_Component then
-               Index := First (Expressions (Choice));
+               Index := First (Expressions (Pref));
                Apply_Scalar_Range_Check (Index, Etype (Index));
 
             elsif Is_Array_Type (Typ)
-- 
2.42.0


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

only message in thread, other threads:[~2023-11-21 10:00 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-21 10:00 [COMMITTED] ada: Fix type for SPARK expansion on deep delta aggregates 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).