Nvfortran 24.1 regression: uses defined assignment from other module but should not

Hello,
I’ve reduced a strange case where versions up to 23.11 gave the right code but 24.1 fails for me because it strangely uses defined assignment from another module but should rather do intrinsic assignment.
The reproducer consists of 3 files to make the scoping clear.

reproducer.tar.gz (871 Bytes)

I get:

% nvfortran mod?.f90 && ./a.out 
mod1.f90:
mod2.f90:
mod3.f90:
            1            1            2            2
            2            1            6            2
  F  F

Expected output (previous versions and other compilers):

            1            1            2            2
            1            1            2            2
  T  T

It is actually sufficient to compile file mod3.f90 with 23.11 to get the right result.
This is supported by the observation that in the case of 24.1 I find:

% nm mod3.o | grep assign_atm_to_atm
                 U mod2_assign_atm_to_atm_

This should not happen…

Thanks anlauf, I’ve reported the issue, TPR #35147, and have sent it to engineering for investigation.

FYI, TPR #35147 was fixed in the 24.3 release.

-Mat

Great! Many thanks for the quick fix.

Harald