1! { dg-do compile } 2! PR fortran/63514.f90 3program foo 4 5 implicit none 6 7 integer, volatile :: n 8 9 n = 0 10 11 call bar 12 call bah 13 14 contains 15 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 27 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 40 41end program foo 42