https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82550
Bug ID: 82550
Summary: program using submodules fails to link
Product: gcc
Version: 7.2.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: Bader at lrz dot de
Target Milestone: ---
Created attachment 42365
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=42365&action=edit
reproducer
The attached example implements a separate module procedure returning a
procedure pointer. gfortran 7,2 compiles the code, but issues the following
error message at the linking stage:
/gpfs/scratch/pr28fa/a2832ba/a2832ba/ccmqzru6.o: In function
`__m_subm_18_pos_MOD_foo':
subm_18_pos.f90:(.text+0x20): undefined reference to `p.3503'
It seems that host association to the module procedure p() fails, because
linking works if an external procedure is used.