[Patch, fortran] PR82275 - gfortran rejects valid & accepts invalid reference to dimension-remapped type SELECT TYPE selector
Paul Richard Thomas
paul.richard.thomas@gmail.com
Sat May 19 08:34:00 GMT 2018
This patch is verging on 'obvious' since there was no attempt being
made to detect dimensions where the array reference of the selector is
an element. In fact, I made an attempt when the bug was first reported
to do this, Not realizing that the elements were coming through as
DIMEN_UNKNOWN, the attempt failed. This is now catered for.
Bootstrapped and regtested on FC27/x86_64. OK for all active branches?
Paul
2018-05-19 Paul Thomas <pault@gcc.gnu.org>
PR fortran/82275
* match.c (gfc_match_type_spec): Go through the array ref and
decrement 'rank' for every dimension that is an element.
2018-05-19 Paul Thomas <pault@gcc.gnu.org>
PR fortran/82923
* gfortran.dg/select_type_42.f90: New test.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: submit.diff
Type: text/x-patch
Size: 3520 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20180519/b8e7b652/attachment.bin>
More information about the Fortran
mailing list