https://gcc.gnu.org/g:54d5c2b1f7439ae01781532b52d9bda99091c163
commit r13-9168-g54d5c2b1f7439ae01781532b52d9bda99091c163 Author: Eric Botcazou <ebotca...@adacore.com> Date: Mon Nov 4 11:15:15 2024 +0100 Add regression test This is for the latest fix made to Selected_Length_Checks in Checks. gcc/testsuite * gnat.dg/specs/array7.ads: New test. Diff: --- gcc/testsuite/gnat.dg/specs/array7.ads | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/gcc/testsuite/gnat.dg/specs/array7.ads b/gcc/testsuite/gnat.dg/specs/array7.ads new file mode 100644 index 000000000000..643ec3bb9ce5 --- /dev/null +++ b/gcc/testsuite/gnat.dg/specs/array7.ads @@ -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;