https://gcc.gnu.org/g:8da27c7b3b8e16c09ef86a46746e1295421fa237

commit r15-4181-g8da27c7b3b8e16c09ef86a46746e1295421fa237
Author: Eric Botcazou <ebotca...@adacore.com>
Date:   Tue Oct 8 15:15:26 2024 +0200

    Add regression test
    
    gcc/testsuite/
            PR ada/115535
            * gnat.dg/put_image1.adb: New test

Diff:
---
 gcc/testsuite/gnat.dg/put_image1.adb | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/gcc/testsuite/gnat.dg/put_image1.adb 
b/gcc/testsuite/gnat.dg/put_image1.adb
new file mode 100644
index 000000000000..396967ce1157
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/put_image1.adb
@@ -0,0 +1,21 @@
+-- { dg-do run }
+-- { dg-options "-gnat2022" }
+
+with Ada.Text_IO; use Ada.Text_IO;
+
+procedure Put_Image1 is
+
+  type Client_ID_Part is range 0 .. 2**32 - 1 with Size => 32;
+
+  type Client_ID is array (1 .. 2) of Client_ID_Part;
+
+  A : Client_ID := (1479222903, 3163714999);
+
+begin
+   Put_Line (A'Image);
+   -- { dg-output ".* 1479222903,  3163714999.*\n" }
+   Put_Line (A (1)'Image);
+   -- { dg-output " 1479222903.*\n" }
+   Put_Line (A (2)'Image);
+   -- { dg-output " 3163714999.*\n" }
+end;

Reply via email to