* loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
[official-gcc.git] / gcc / testsuite / gnat.dg / loop_optimization24.adb
blob641d28ed97c3bf34282deef898454325bae46668
1 -- { dg-do run }
2 -- { dg-options "-O" }
4 procedure Loop_Optimization24 is
6 procedure Callback is
7 begin
8 raise Constraint_Error;
9 end;
11 type Thread_Name_Ptr is access constant String;
12 type Callback_Ptr is access procedure;
14 type Callback_Information is record
15 Name : Thread_Name_Ptr;
16 Proc : Callback_Ptr;
17 end record;
19 type Callback_List is array (Positive range <>) of Callback_Information;
21 Cbs : Callback_List
22 := (1 => (Proc => Callback'access, name => new String'("Callback")),
23 2 => (Proc => Callback'access, name => new String'("Callback")));
25 begin
26 for Index in Cbs'Range loop
27 begin
28 if Cbs(Index).proc /= null then
29 Cbs(Index).proc.all;
30 end if;
31 exception
32 when Constraint_Error => null;
33 end;
34 end loop;
35 end;