https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83551
Paul Thomas <pault at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|WAITING |RESOLVED Resolution|--- |FIXED --- Comment #4 from Paul Thomas <pault at gcc dot gnu.org> --- (In reply to Dominique d'Humieres from comment #3) > Likely fixed by revision r251949 (pr34640 and friends). Considering the size > of the commit I doubt that it will be back-ported. It was indeed this patch, whose entire purpose was to catch the reporter's testcase. Were the size of the patch the only problem, I would consider backporting to 7-branch. However, the patch breaks the array descriptor ABI and so my inclination is to mark the PR as RESOLVED. Gilbert, I have been around the houses on how to fix the likes of your testcase in other ways. It is indeed valid fortran. It is the last remaining F95 non-compliance of gfortran. Unfortunately, the original design of the gfortran array descriptor did not allow for such pointers. For some reason, hidden in the mists of time, the 'dim' triplet chosen was {lbound, stride, ubound}, whereas most (all?) other compilers use {lbound, stride_measure, extent}. The difference is that stride is in units of the element length, whereas stride_measure is in bytes so that elements of derived types can be addressed. If you can upgrade to 8.0.0, you will be rewarded by having your code work, as Steve has reported. Sorry about this - it is a very useful f95 feature. Paul