https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86694
kargl at gcc dot gnu.org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kargl at gcc dot gnu.org --- Comment #3 from kargl at gcc dot gnu.org --- Adding my text from the duplicate bug report. Interesting bug. gfortran tries to reduce the constant expression to a constant during the parse phase. This reduction occurs too early and needs to be moved to the resolution phase. In particular, decl.c:8052-8123 need to change/move to someplace in resolve.c where the host namespace can be resolved to accommodate the import statement. Good Luck and happy hacking.