Fix the new pr83361.c testcase
[official-gcc.git] / gcc / testsuite / gnat.dg / opt6.adb
blob44dc047b538f2d15c6e64b4a16bb515433930139
1 -- PR rtl-optimization/45394
3 -- { dg-do compile }
4 -- { dg-options "-O2 -g" }
6 package body Opt6 is
8 function Current_Parameter (Iter : Command_Line_Iterator) return String is
9 begin
10 if Iter.Params = null
11 or else Iter.Current > Iter.Params'Last
12 or else Iter.Params (Iter.Current) = null
13 then
14 return "";
16 else
17 declare
18 P : constant String := Iter.Params (Iter.Current).all;
20 begin
21 -- Skip separator
23 return P (P'First + 1 .. P'Last);
24 end;
25 end if;
26 end Current_Parameter;
28 end Opt6;