gcc/testsuite/gnat.dg/limited3_pkg.adb
raw| 1 | package body Limited3_Pkg is |
| 2 | function F (I : Integer) return Rec is |
| 3 | begin |
| 4 | return (D => False, I => I); |
| 5 | end; |
| 6 | |
| 7 | function FS (X : Integer) return Var_Rec is |
| 8 | begin |
| 9 | return (X, (1..X => '?'), Tag => <>); |
| 10 | end FS; |
| 11 | |
| 12 | function F2 (I : Integer) return Rec2 is |
| 13 | begin |
| 14 | if I > 0 then |
| 15 | return (D => False, I => I); |
| 16 | else |
| 17 | return (D => True, L => new Limited_Rec); |
| 18 | end if; |
| 19 | end; |
| 20 | end Limited3_Pkg; |