| 1 |
! { dg-do compile } |
| 2 |
! { dg-options "-std=f2018" } |
| 3 |
! |
| 4 |
! PR 85839: [F2018] warn for obsolescent features |
| 5 |
! |
| 6 |
! Contributed by Janus Weil <[email protected]> |
| 7 |
|
| 8 |
block data ! { dg-warning "obsolescent feature" } |
| 9 |
common /a/ y(3) ! { dg-warning "obsolescent feature" } |
| 10 |
data y /3*1./ |
| 11 |
end |
| 12 |
|
| 13 |
program f2018_obs |
| 14 |
|
| 15 |
implicit none |
| 16 |
integer :: a(10),b(10),j(8),i |
| 17 |
real :: x(3) |
| 18 |
common /c/ x ! { dg-warning "obsolescent feature" } |
| 19 |
|
| 20 |
equivalence (a(10),b(1)) ! { dg-warning "obsolescent feature" } |
| 21 |
|
| 22 |
do 99 i=1,10 ! { dg-warning "obsolescent feature" } |
| 23 |
99 continue |
| 24 |
|
| 25 |
j = (/ 0, 1, 2, 3, 4, 0, 6, 7 /) |
| 26 |
forall (i=1:8, j(i) /= 0) ! { dg-warning "obsolescent feature" } |
| 27 |
j(i) = 0 |
| 28 |
end forall |
| 29 |
end |