[Patch, fortran] PR fortran/94110 - Passing an assumed-size to an assumed-shape argument should be rejected

José Rui Faustino de Sousa jrfsousa@gmail.com
Thu Aug 20 22:49:05 GMT 2020


Hi all!

Proposed patch to PR94110 - Passing an assumed-size to an assumed-shape 
argument should be rejected.

Patch tested only on x86_64-pc-linux-gnu.

Add code to also check for deferred-shape and assumed-rank pointer 
(allocatable arguments are checked elsewhere) dummy arguments being 
passed an assumed-size array formal argument when raising an error.

Thank you very much.

Best regards,
José Rui


2020-8-20  José Rui Faustino de Sousa  <jrfsousa@gmail.com>

  PR fortran/94110
  * interface.c (gfc_compare_actual_formal): Add code to also raise the
  actual argument cannot be an assumed-size array error when the dummy
  arguments are deferred-shape or assumed-rank pointer.

2020-8-20  José Rui Faustino de Sousa  <jrfsousa@gmail.com>

  PR fortran/94110
  * PR94110.f90: New test.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PR94110.patch
Type: text/x-patch
Size: 2708 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc-patches/attachments/20200820/e2b4bee6/attachment.bin>


More information about the Gcc-patches mailing list