aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/volatile14.f90
blob: 15730c83f9b39a178e3228a0217399b61cf57680 (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 }
!
! PR 46459: ICE (segfault): Invalid read in compare_actual_formal [error recovery]
!
! Contributed by Harald Anlauf <anlauf@gmx.de>

  call sub (1)
contains
  subroutine sub (j)
    integer, volatile :: j
  end subroutine
end

subroutine sub1 ()
  call sub2 (1)         ! { dg-error "Explicit interface required" }
end subroutine

subroutine sub2 (j)
  integer, volatile :: j
end subroutine

subroutine sub3 ()
  interface
     subroutine sub2 (j)
       integer, volatile :: j
     end subroutine
  end interface
  call sub2 (1)
end subroutine