| 1 |
-- { dg-do compile } |
| 2 |
-- { dg-options "-gnatwa" } |
| 3 |
|
| 4 |
procedure Warn14 is |
| 5 |
|
| 6 |
type E is record |
| 7 |
P : Boolean; |
| 8 |
end record; |
| 9 |
|
| 10 |
EE : Boolean := True; -- { dg-warning "variable \"EE\" is not referenced" } |
| 11 |
|
| 12 |
function F1 (I : Natural) return Natural is -- { dg-warning "function \"F1\" is not referenced" } |
| 13 |
begin |
| 14 |
return I; |
| 15 |
end; |
| 16 |
|
| 17 |
function F2 (I : Natural) return Natural is (I); -- { dg-warning "function \"F2\" is not referenced" } |
| 18 |
|
| 19 |
function F3 (I : Natural) return Natural is (1); -- { dg-warning "function \"F3\" is not referenced|formal parameter \"I\" is not referenced" } |
| 20 |
|
| 21 |
function F7 (EE : E) return Boolean is (EE.P); -- { dg-warning "function \"F7\" is not referenced" } |
| 22 |
|
| 23 |
package YY is |
| 24 |
type XX is tagged null record; |
| 25 |
|
| 26 |
function F4 (Y : XX; U : Boolean) return Natural is (1); |
| 27 |
end YY; |
| 28 |
|
| 29 |
XXX : YY.XX; |
| 30 |
B : Natural := XXX.F4 (True); -- { dg-warning "variable \"B\" is not referenced" } |
| 31 |
begin |
| 32 |
null; |
| 33 |
end; |