https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88124
Bug ID: 88124 Summary: Wrong results with procedure in seperate file Product: gcc Version: 8.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: jvdelisle at gcc dot gnu.org Target Milestone: --- Created attachment 45049 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=45049&action=edit Code to reproduce The attached code works correctly when subroutine is conationed as shown in maim.F. If the subroutine is instead provided in a separate file such as sub.F and compiled with "gfortran main.F sub.F" results are wrong.