c: Fix up pointer types to may_alias structures [PR114493]
[official-gcc.git] / gcc / testsuite / gfortran.dg / pr63514.f90
blob389fb92608ec2ec08af4421fb1247dfb16d143bd
1 ! { dg-do compile }
2 ! PR fortran/63514.f90
3 program foo
5 implicit none
7 integer, volatile :: n
9 n = 0
11 call bar
12 call bah
14 contains
16 subroutine bar
17 integer k
18 integer, volatile :: m
19 block
20 integer, save :: i
21 integer, volatile :: j
22 i = 42
23 j = 2 * i
24 k = i + j + n
25 end block
26 end subroutine bar
28 pure subroutine bah
29 integer k
30 integer, volatile :: m ! { dg-error "cannot be specified in a PURE" }
31 block
32 integer, save :: i ! { dg-error "cannot be specified in a PURE" }
33 integer, volatile :: j ! { dg-error "cannot be specified in a PURE" }
34 i = 42 ! { dg-error "has no IMPLICIT type" }
35 j = 2 * i ! { dg-error "has no IMPLICIT type" }
36 k = i + j + n
37 end block
38 m = k * m ! { dg-error "has no IMPLICIT type" }
39 end subroutine bah
41 end program foo