aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/f2018_obs.f90
blob: 0a8dca9706a85bf84502c640ca94c3faa0d02af1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
! { dg-do compile }
! { dg-options "-std=f2018" }
!
! PR 85839: [F2018] warn for obsolescent features
!
! Contributed by Janus Weil <janus@gcc.gnu.org>

block data                           ! { dg-warning "obsolescent feature" }
  common /a/ y(3)                    ! { dg-warning "obsolescent feature" }
  data y /3*1./
end

program f2018_obs

  implicit none
  integer :: a(10),b(10),j(8),i
  real :: x(3)
  common /c/ x                       ! { dg-warning "obsolescent feature" }

  equivalence (a(10),b(1))           ! { dg-warning "obsolescent feature" }

  do 99 i=1,10
99 continue                          ! { dg-warning "obsolescent feature" }

  j = (/ 0, 1, 2, 3, 4, 0, 6, 7  /)
  forall (i=1:8, j(i) /= 0)          ! { dg-warning "obsolescent feature" }
    j(i) = 0
  end forall
end