https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86484
Bug ID: 86484 Summary: Undefined symbol when using polymorphic intrinsic assignment Product: gcc Version: 7.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: townsend at astro dot wisc.edu Target Milestone: --- I'm getting an undefined symbol at link time when compiling the following test program, which involves intrinsic polymorphic assignment: program test_assign implicit none type :: foo_t real :: a = 1. end type foo_t type, extends (foo_t) :: bar_t real :: b = 2. end type bar_t class(foo_t), allocatable :: f type(bar_t) :: b f = b print *, f%a end program test_assign From compiling: % gfortran -O2 -o test_assign test_assign.f90 Undefined symbols for architecture x86_64: "___copy_test_assign_Bar_t.3535", referenced from: _MAIN__ in ccPjl5CK.o ___vtab_test_assign_Bar_t.3533 in ccPjl5CK.o ld: symbol(s) not found for architecture x86_64 collect2: error: ld returned 1 exit status This problem seems to exist on both 7.2 and 8.1, and on both Linux and OSX. cheers, Rich