gcc/testsuite/gnat.dg/opt38_pkg.adb
raw| 1 | package body Opt38_Pkg is |
| 2 | |
| 3 | procedure Proc (I : Integer); |
| 4 | pragma Inline (Proc); |
| 5 | |
| 6 | procedure Proc (I : Integer) is |
| 7 | |
| 8 | procedure Inner; |
| 9 | pragma No_Inline (Inner); |
| 10 | |
| 11 | procedure Inner is |
| 12 | begin |
| 13 | if I /= 110 then |
| 14 | raise Program_Error; |
| 15 | end if; |
| 16 | end; |
| 17 | |
| 18 | begin |
| 19 | if I > 0 then |
| 20 | Inner; |
| 21 | end if; |
| 22 | end; |
| 23 | |
| 24 | procedure Test (I : Integer) is |
| 25 | begin |
| 26 | if I > -1 then |
| 27 | Proc (I); |
| 28 | else |
| 29 | Proc (I + 111); |
| 30 | end if; |
| 31 | end; |
| 32 | |
| 33 | end Opt38_Pkg; |