http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51268
Tobias Burnus <burnus at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |burnus at gcc dot gnu.org --- Comment #1 from Tobias Burnus <burnus at gcc dot gnu.org> 2011-11-22 16:09:19 UTC --- Well, that one now gets a diagnostic and didn't get one before is a change, but the question is whether it is a progression or a regression. NAG prints: Error: line 15: USE MYINTERFACES in program-unit MYSUB imports symbol MYSUB g95 prints: Module 'myinterfaces' at (1) redefines the current program unit 'mysub' pathf95 prints: "MYSUB" is the name of this program unit, therefore it must not be use associated from module "MYINTERFACES". openf95 prints: "MYSUB" is the name of this program unit, therefore it must not be use associated from module "MYINTERFACES". crayftn prints: "MYSUB" is the name of this program unit, therefore it must not be use associated from module "MYINTERFACES". While ifort prints (only with -stand f95/f03): warning #7925: An interface-block in a subprogram shall not contain an interface-body for a procedure defined by that subprogram. [MYSUB] And "pgf90 -Minfo=all" and "sunf95 -w0" simply silently accept the program. I think the program is indeed invalid - but if needed, I can check the standard. One could consider allowing it with a warning (as ifort does), but I am not sure one should.