diff options
Diffstat (limited to 'gcc/testsuite/gnat.dg/dse_step.adb')
-rw-r--r-- | gcc/testsuite/gnat.dg/dse_step.adb | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc/testsuite/gnat.dg/dse_step.adb b/gcc/testsuite/gnat.dg/dse_step.adb new file mode 100644 index 000000000..040bcb7d2 --- /dev/null +++ b/gcc/testsuite/gnat.dg/dse_step.adb @@ -0,0 +1,18 @@ +package body Dse_Step is + + procedure Do_Step (This : in out Counter) is + begin + This.Value := This.Value + This.Step; + end; + + procedure Step_From (Start : in My_Counter) is + Lc : My_Counter := Start; + begin + while Nsteps > 0 loop + Do_Step (Lc); + Nsteps := Nsteps - 1; + end loop; + Mv := Lc.Value; + end; + +end; |