PR fortran/95373 - ICE in build_reference_type, at tree.c:7942
authorHarald Anlauf <anlauf@gmx.de>
Thu, 28 May 2020 20:28:08 +0000 (22:28 +0200)
committerHarald Anlauf <anlauf@gmx.de>
Thu, 28 May 2020 20:32:59 +0000 (22:32 +0200)
commit5c715e6a2990cfb6c15acc1ee14219523534ec69
treec9a5e2a6e742f4dab84fc91fab4600fc2c7ae539
parent6ce3d791dfcba469e709935aba5743640f7d4959
PR fortran/95373 - ICE in build_reference_type, at tree.c:7942

The use of KIND, LEN, RE, and IM inquiry references for applicable intrinsic
types is valid only for suffienctly new Fortran standards.  Add appropriate
check.

2020-05-28  Harald Anlauf  <anlauf@gmx.de>

gcc/fortran/
PR fortran/95373
* primary.c (is_inquiry_ref): Check validity of inquiry
references against selected Fortran standard.

gcc/testsuite/
PR fortran/95373
* gfortran.dg/pr95373_1.f90: New test.
* gfortran.dg/pr95373_2.f90: New test.
gcc/fortran/primary.c
gcc/testsuite/gfortran.dg/pr95373_1.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/pr95373_2.f90 [new file with mode: 0644]