[PATCH] PR fortran/99169 - [9/10/11 Regression] Segfault when passing allocatable scalar into intent(out) dummy argument

Tobias Burnus tobias@codesourcery.com
Sat Feb 20 21:02:59 GMT 2021


Dear Harald,

On 19.02.21 22:16, Harald Anlauf via Fortran wrote:
> we should not clobber the pointer in case of an allocatable scalar being
> an intent(out) dummy argument to a procedure.
>
> Regtested on x86_64-pc-linux-gnu.
> OK for master?  Since this is a regression, also for backports to 10/9?

OK to both master and to backporting.

Thanks for the patch!

Tobias

> PR fortran/99169 - Do not clobber allocatable intent(out) dummy argument
>
> gcc/fortran/ChangeLog:
>
>       * trans-expr.c (gfc_conv_procedure_call): Do not add clobber to
>       allocatable intent(out) argument.
>
> gcc/testsuite/ChangeLog:
>
>       * gfortran.dg/intent_optimize_3.f90: New test.
>
-----------------
Mentor Graphics (Deutschland) GmbH, Arnulfstrasse 201, 80634 München Registergericht München HRB 106955, Geschäftsführer: Thomas Heurung, Frank Thürauf


More information about the Gcc-patches mailing list