From: Eric Botcazou Date: Tue, 8 Oct 2024 13:15:26 +0000 (+0200) Subject: Add regression test X-Git-Tag: basepoints/gcc-16~5372 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8da27c7b3b8e16c09ef86a46746e1295421fa237;p=thirdparty%2Fgcc.git Add regression test gcc/testsuite/ PR ada/115535 * gnat.dg/put_image1.adb: New test --- diff --git a/gcc/testsuite/gnat.dg/put_image1.adb b/gcc/testsuite/gnat.dg/put_image1.adb new file mode 100644 index 00000000000..396967ce115 --- /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;