diff options
Diffstat (limited to 'gcc/testsuite/gnat.dg/loop_optimization4_pkg.adb')
-rw-r--r-- | gcc/testsuite/gnat.dg/loop_optimization4_pkg.adb | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/gcc/testsuite/gnat.dg/loop_optimization4_pkg.adb b/gcc/testsuite/gnat.dg/loop_optimization4_pkg.adb new file mode 100644 index 000000000..ba372f6bd --- /dev/null +++ b/gcc/testsuite/gnat.dg/loop_optimization4_pkg.adb @@ -0,0 +1,17 @@ +package body Loop_Optimization4_Pkg is + + procedure Add (Phrase : String) is + begin + if Debug_Buffer_Len = Max_Debug_Buffer_Len then + return; + end if; + for I in Phrase'Range loop + Debug_Buffer_Len := Debug_Buffer_Len + 1; + Debug_Buffer (Debug_Buffer_Len) := Phrase (I); + if Debug_Buffer_Len = Max_Debug_Buffer_Len then + exit; + end if; + end loop; + end Add; + +end Loop_Optimization4_Pkg; |