From: Eric Botcazou Date: Tue, 8 Oct 2024 13:17:27 +0000 (+0200) Subject: Add regression test X-Git-Tag: basepoints/gcc-16~5371 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5f0a381801b754dbbd52695bbdbe48967211659c;p=thirdparty%2Fgcc.git Add regression test gcc/testsuite/ PR ada/116190 * gnat.dg/aggr31.adb: New test. --- diff --git a/gcc/testsuite/gnat.dg/aggr31.adb b/gcc/testsuite/gnat.dg/aggr31.adb new file mode 100644 index 00000000000..8e95f808d88 --- /dev/null +++ b/gcc/testsuite/gnat.dg/aggr31.adb @@ -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; +