https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59796
Thomas Koenig <tkoenig at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|WAITING |RESOLVED Resolution|--- |WONTFIX --- Comment #5 from Thomas Koenig <tkoenig at gcc dot gnu.org> --- (In reply to Walter Spector from comment #3) > My initial reaction is that yes, 6.7.3.3 in F08 states what you quoted. And > I agree that it is a programming error to pass a dangling pointer into > deallocate. But that does not preclude gfortran from returning some sort of > error back to the user when stat= is present. In fact, 6.7.4 seems to > *require* it - at least in the case of co-arrays. (... "If any other error > condition occurs...") So I don't see a conflict in the Standard. There are two points here: Standard and possibility of implementation. For deallocate, the set of error conditions is processor dependent (9.7.3.1, para 3), so we can argue that this particular case is not an error condition. Rgarding pracical implementation: Under the hood, we use malloc()/free(). Unless we want to put a malloc debugger into gfortran, catching this sort of error is not really possible. So, I am closing this one as WONTFIX.