* gcc.target/i386/mpx/hard-reg-1-nov.c (mpx_test): Use "esp"
[official-gcc.git] / gcc / testsuite / gnat.dg / debug10.adb
blob5612b7874e467456ff14efcb08acbfa6888cba41
1 -- PR debug/80321
3 -- { dg-do compile }
4 -- { dg-options "-O2 -g" }
6 with Debug10_Pkg; use Debug10_Pkg;
8 procedure Debug10 (T : Entity_Id) is
10 procedure Inner (E : Entity_Id);
11 pragma Inline (Inner);
13 procedure Inner (E : Entity_Id) is
14 begin
15 if E /= Empty
16 and then not Nodes (E + 3).Flag16
17 then
18 Debug10 (E);
19 end if;
20 end Inner;
22 function Ekind (E : Entity_Id) return Entity_Kind is
23 begin
24 return N_To_E (Nodes (E + 1).Nkind);
25 end Ekind;
27 begin
29 if T = Empty then
30 return;
31 end if;
33 Nodes (T + 3).Flag16 := True;
35 if Ekind (T) in Object_Kind then
36 Inner (T);
38 elsif Ekind (T) in Type_Kind then
39 Inner (T);
41 if Ekind (T) in Record_Kind then
43 if Ekind (T) = E_Class_Wide_Subtype then
44 Inner (T);
45 end if;
47 elsif Ekind (T) in Array_Kind then
48 Inner (T);
50 elsif Ekind (T) in Access_Kind then
51 Inner (T);
53 elsif Ekind (T) in Scalar_Kind then
55 if My_Scalar_Range (T) /= Empty
56 and then My_Test (My_Scalar_Range (T))
57 then
58 if My_Is_Entity_Name (T) then
59 Inner (T);
60 end if;
62 if My_Is_Entity_Name (T) then
63 Inner (T);
64 end if;
65 end if;
66 end if;
67 end if;
68 end;