PR tree-optimization/86415 - strlen() not folded for substrings within constant arrays
[official-gcc.git] / gcc / testsuite / gfortran.dg / f2018_obs.f90
blob0a8dca9706a85bf84502c640ca94c3faa0d02af1
1 ! { dg-do compile }
2 ! { dg-options "-std=f2018" }
4 ! PR 85839: [F2018] warn for obsolescent features
6 ! Contributed by Janus Weil <janus@gcc.gnu.org>
8 block data ! { dg-warning "obsolescent feature" }
9 common /a/ y(3) ! { dg-warning "obsolescent feature" }
10 data y /3*1./
11 end
13 program f2018_obs
15 implicit none
16 integer :: a(10),b(10),j(8),i
17 real :: x(3)
18 common /c/ x ! { dg-warning "obsolescent feature" }
20 equivalence (a(10),b(1)) ! { dg-warning "obsolescent feature" }
22 do 99 i=1,10
23 99 continue ! { dg-warning "obsolescent feature" }
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