]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Add regression test
authorEric Botcazou <ebotcazou@adacore.com>
Mon, 4 Nov 2024 10:15:15 +0000 (11:15 +0100)
committerEric Botcazou <ebotcazou@adacore.com>
Mon, 4 Nov 2024 10:50:37 +0000 (11:50 +0100)
This is for the latest fix made to Selected_Length_Checks in Checks.

gcc/testsuite
* gnat.dg/specs/array7.ads: New test.

gcc/testsuite/gnat.dg/specs/array7.ads [new file with mode: 0644]

diff --git a/gcc/testsuite/gnat.dg/specs/array7.ads b/gcc/testsuite/gnat.dg/specs/array7.ads
new file mode 100644 (file)
index 0000000..643ec3b
--- /dev/null
@@ -0,0 +1,14 @@
+-- { dg-do compile }
+-- { dg-options "-O" }
+
+package Array7 is
+
+  type I is interface;
+
+  type Rec (Name_Len : Natural) is new I with record
+    Input : String (1 .. Name_Len);
+  end record;
+
+  function Image (R : Rec) return String is ("I" & String (R.Input));
+
+end Array7;