------- Comment #8 from burnus at gcc dot gnu dot org 2008-09-10 11:33 ------- > actually, I rather sure that gfortran gets it wrong. This would be a > wrong-code Unless it were accepts-invalid. (Which I don't think, see below.)
Unfortunately, I yesterday somehow completely missed the second CONTAINS, which makes putALine an internal procedure to subroutine S3, which changes the picture as this is no longer a USE-associated issue but a internal procedure vs. host-associated. Sorry for misreading this. I believe it is allowed per "16.4.1.3 Host association", but I cannot find the case of an internal procedure. Maybe it is also hidden in "16.2 Scope of local identifiers", which rules out some cases which do not apply (and one could argue it thus allows this not ruled out case). In any case, I believe (now that I saw the second CONTAINS) that the programs in comment 3 and comment 7 are valid. Sorry again for my misreading. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37445