Daniel,
The assertion fails e.g. on use_only_1.f90. I can only speculate here, but
my interpretation is this:
I thought that this might be the case.
load_needed() loads symbols that are "needed" for the ones USE'd (in
use_only_1.f90, on USE'ing mod2::yfoobar (an INTERFACE) the procedures that
are part of this interface are needed) and those can be symbols not listed
in the USE...ONLY and thus the initialization there is necessary as is the
one I added to get round the problem the PR was about.
I've added a comment to my new line explaining why we need to initialize
here and would suggest to take the patch as it is; but maybe you can come up
with a better solution as you probably know the code better than I do.
Otherwise, ok to commit?
I think that we had better take the pragmatic view - it works.
"probably" is the operative word here - I wade into module.c every 6
months or so and have to learn afresh each time..... as I am doing
right now.
OK to commit.