Require target lra in gcc.dg/pr108095.c
[official-gcc.git] / gcc / testsuite / gnat.dg / warn14.adb
blobf9d03d1fb04b56afec847b51bf178ae535e9d35d
1 -- { dg-do compile }
2 -- { dg-options "-gnatwa" }
4 procedure Warn14 is
6 type E is record
7 P : Boolean;
8 end record;
10 EE : Boolean := True; -- { dg-warning "variable \"EE\" is not referenced" }
12 function F1 (I : Natural) return Natural is -- { dg-warning "function \"F1\" is not referenced" }
13 begin
14 return I;
15 end;
17 function F2 (I : Natural) return Natural is (I); -- { dg-warning "function \"F2\" is not referenced" }
19 function F3 (I : Natural) return Natural is (1); -- { dg-warning "function \"F3\" is not referenced|formal parameter \"I\" is not referenced" }
21 function F7 (EE : E) return Boolean is (EE.P); -- { dg-warning "function \"F7\" is not referenced" }
23 package YY is
24 type XX is tagged null record;
26 function F4 (Y : XX; U : Boolean) return Natural is (1);
27 end YY;
29 XXX : YY.XX;
30 B : Natural := XXX.F4 (True); -- { dg-warning "variable \"B\" is not referenced" }
31 begin
32 null;
33 end;