https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110644
--- Comment #8 from Alberto Luaces <aluaces at udc dot es> --- No, I meant building *gcc* with those flags, but alas each gcc compilation stage was still building with "-O2" so almost all of the compiler structures are still optimized. Nevertheless I did what you suggest and climbed up those 6 levels to find that indeed expr->where has null fields. To me it is not very strange since in my code there is a structure that has copy and assignment members. gfortran is arguing about them being called in another module, but of course there is no physical place where they are called, as this is done implicitly by the compiler when using those kind of objects, if I am correct. I am rebuilding with your suggested gfc_current_locus change and reporting the results.