https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96986
Bug ID: 96986 Summary: [8 Regression] Explicit interface required: volatile argument for ENTRY subroutine Product: gcc Version: 8.3.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: foreese at gcc dot gnu.org Target Milestone: --- Created attachment 49200 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49200&action=edit Testcase which exhibits the regression GCC 8.3.1 does not accept the following program, but all versions 4.x through 7.x and <= 8.3.0 do: $ cat volatile.for subroutine volatile_test () implicit none integer(4), volatile :: va entry fun_a() return entry fun_b(va) call fun_c() return end subroutine fun_c () implicit none call fun_a() return end $ gfortran -std=legacy -c volatile.for volatile.for:15:18: call fun_a() 1 Error: Explicit interface required for ‘fun_a’ at (1): volatile argument It seems that because fun_b() has a volatile argument, the subroutine volatile_test() is marked as such. Subsequently the call to fun_a() from fun_c() within the same procedure trips the error. The regression appears to have been introduced in r269895 on gcc-9 which fixed PR 78865. The fix was backported to gcc-8 by r270032 and released as part of 8.3.1.