]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Add regression test
authorEric Botcazou <ebotcazou@adacore.com>
Tue, 8 Oct 2024 13:17:27 +0000 (15:17 +0200)
committerEric Botcazou <ebotcazou@adacore.com>
Tue, 8 Oct 2024 16:01:22 +0000 (18:01 +0200)
gcc/testsuite/
PR ada/116190
* gnat.dg/aggr31.adb: New test.

gcc/testsuite/gnat.dg/aggr31.adb [new file with mode: 0644]

diff --git a/gcc/testsuite/gnat.dg/aggr31.adb b/gcc/testsuite/gnat.dg/aggr31.adb
new file mode 100644 (file)
index 0000000..8e95f80
--- /dev/null
@@ -0,0 +1,17 @@
+-- { dg-do run }
+-- { dg-options "-gnat2022" }
+
+with Ada.Strings.Unbounded; use Ada.Strings.Unbounded;
+
+procedure Aggr31 is
+
+  My_Array : constant array (1 .. 5) of Unbounded_String :=
+    [others => To_Unbounded_String ("Test")];
+
+  This_Crashes : constant array (Natural range <>) of Unbounded_String :=
+    [for I of My_Array => I];
+
+begin
+  null;
+end;
+