Hi Harald,

On 27.07.21 23:42, Harald Anlauf wrote:
This almost worked, needing only a restriction to %KIND and %LEN.
Note that %RE and %IM are usually definable.
Well spotted :-)
Regtested on x86_64-pc-linux-gnu.  OK?
LGTM - except [...] feel free add them and commit without further review.
[...]
I have added the updated "final" version of the patch to give
everybody another 24h to have a look, and will commit if nobody
complains.
LGTM - thanks again.

[...] with fixing a few issues on the way before Gerhard finds them...

:-)

Tobias

Fortran: ICE in resolve_allocate_deallocate for invalid STAT argument

gcc/fortran/ChangeLog:

      PR fortran/101564
      * expr.c (gfc_check_vardef_context): Add check for KIND and LEN
      parameter inquiries.
      * match.c (gfc_match): Fix comment for %v code.
      (gfc_match_allocate, gfc_match_deallocate): Replace use of %v code
      by %e in gfc_match to allow for function references as STAT and
      ERRMSG arguments.
      * resolve.c (resolve_allocate_deallocate): Avoid NULL pointer
      dereferences and shortcut for bad STAT and ERRMSG argument to
      (DE)ALLOCATE.  Remove bogus parts of checks for STAT and ERRMSG.

gcc/testsuite/ChangeLog:

      PR fortran/101564
      * gfortran.dg/allocate_stat_3.f90: New test.
      * gfortran.dg/allocate_stat.f90: Adjust error messages.
      * gfortran.dg/implicit_11.f90: Likewise.
      * gfortran.dg/inquiry_type_ref_3.f90: Likewise.
-----------------
Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634 
München; Gesellschaft mit beschränkter Haftung; Geschäftsführer: Thomas 
Heurung, Frank Thürauf; Sitz der Gesellschaft: München; Registergericht 
München, HRB 106955

Reply via email to