https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78466
--- Comment #2 from vehre at gcc dot gnu.org --- Another issue I noticed is that with -O2 the code allocate (A[1:4,-5:*]) if (.not. allocated(A)) error stop stops instead of continuing like it does with all other levels of optimization.