gcc/testsuite/gnat.dg/put_image2.adb
raw| 1 | -- { dg-do run } |
| 2 | -- { dg-options "-gnat2022" } |
| 3 | |
| 4 | procedure Put_Image2 is |
| 5 | |
| 6 | type T is array (1 .. 13) of Integer; |
| 7 | |
| 8 | function "&" (Left : T; Right : T) return T is (others => 2); |
| 9 | |
| 10 | function To_Virtual_String (Item : String) return T is (others => 0); |
| 11 | |
| 12 | procedure F (S : T) is null; |
| 13 | |
| 14 | X : array (1 .. 1) of Integer := [others => 0]; |
| 15 | |
| 16 | begin |
| 17 | F ((others => 0) & To_Virtual_String (X'Image)); |
| 18 | end; |