Debian Codegraph @

gcc/testsuite/gfortran.dg/attr_deprecated.f90

raw
1 ! { dg-do compile }
2
3 module m
4 implicit none
5 integer :: A
6 integer, parameter :: PARM = 5 ! { dg-warning "Using parameter 'parm' declared at .1. is deprecated" }
7 !GCC$ ATTRIBUTES DEPRECATED :: A, foo, func, parm
8 contains
9 subroutine foo
10 end
11 integer function func()
12 func = 42
13 end
14 subroutine bar
15 integer :: i
16 call foo ! { dg-warning "Using subroutine 'foo' at .1. is deprecated" }
17 print *, A ! { dg-warning "Using variable 'a' at .1. is deprecated" }
18 i = func() ! { dg-warning "Using function 'func' at .1. is deprecated" }
19 print *, PARM
20 end
21
22 end module m
23
24 use m ! { dg-warning "Using parameter 'parm' declared at .1. is deprecated" }
25 integer :: i
26 call foo ! { dg-warning "Using subroutine 'foo' at .1. is deprecated" }
27 print *, A ! { dg-warning "Using variable 'a' at .1. is deprecated" }
28 i = func() ! { dg-warning "Using function 'func' at .1. is deprecated" }
29 print *, PARM
30 end