http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25071
--- Comment #9 from Tobias Burnus <burnus at gcc dot gnu.org> 2011-01-25 12:41:11 UTC --- (In reply to comment #8) > actually, I think this is a kind of error that should be caught at run-time > with -fcheck=arguments (not to say bounds). I guess that's not so easy to > implement, as it seem to imply that additional hidden subroutine arguments > need > to be passed around. Well, that assumes that one compiles all files with the checking option. I like the idea better to have a global (static, SAVE) derived-type (struct) variable which contains the arguments and a function pointer. If loc(current function) == loc(function pointer) then the argument checking is done - else it is for a different function and no checking is done.