diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2024-10-08 15:15:26 +0200 |
---|---|---|
committer | Eric Botcazou <ebotcazou@adacore.com> | 2024-10-08 18:01:22 +0200 |
commit | 8da27c7b3b8e16c09ef86a46746e1295421fa237 (patch) | |
tree | 43c906163fc9de9f8e9ae5062769690062538649 /gcc/testsuite/gnat.dg | |
parent | 0c002cce5e0e2f3da0f5360f1c49480e57aaaa34 (diff) | |
download | gcc-8da27c7b3b8e16c09ef86a46746e1295421fa237.zip gcc-8da27c7b3b8e16c09ef86a46746e1295421fa237.tar.gz gcc-8da27c7b3b8e16c09ef86a46746e1295421fa237.tar.bz2 |
Add regression test
gcc/testsuite/
PR ada/115535
* gnat.dg/put_image1.adb: New test
Diffstat (limited to 'gcc/testsuite/gnat.dg')
-rw-r--r-- | gcc/testsuite/gnat.dg/put_image1.adb | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/gcc/testsuite/gnat.dg/put_image1.adb b/gcc/testsuite/gnat.dg/put_image1.adb new file mode 100644 index 0000000..396967c --- /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; |