https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86906
Bug ID: 86906 Summary: erroneous name clash with renaming in use statement Product: gcc Version: 8.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: damian at sourceryinstitute dot org Target Milestone: --- gfortran 6.4, 7.3, and 8.2 all produce the error message below when attempting to use a renamed type while in the same scope as the variable that motivated the renaming: $ cat foo.f90 module foo type config end type end module use foo, only: foo_config => config contains subroutine cap integer config type(foo_config) extra end subroutine end $ gfortran foo.f90 foo.f90:9:26: integer config 2 type(foo_config) extra 1 Error: The type ‘config’ cannot be host associated at (1) because it is blocked by an incompatible object of the same name declared at (2) $ gfortran --version GNU Fortran (GCC) 8.2.0