]> gcc.gnu.org Git - gcc.git/commit
PR fortran/100274 - ICE in gfc_conv_procedure_call, at fortran/trans-expr.c:6131
authorHarald Anlauf <anlauf@gmx.de>
Wed, 5 May 2021 13:25:50 +0000 (15:25 +0200)
committerHarald Anlauf <anlauf@gmx.de>
Wed, 5 May 2021 19:39:10 +0000 (21:39 +0200)
commit92fef3f29917407a31c58c1c06203e4fbe7d4319
treed43974186a8ea003311b3a7e80465f668d6b65f8
parent0df3ba966080be77dd53bdbe3423ae7e24e37c96
PR fortran/100274 - ICE in gfc_conv_procedure_call, at fortran/trans-expr.c:6131

When the check for the length of formal and actual character arguments
found a mismatch and emitted a warning, it would skip further checks
like that could lead to errors.  Fix that by continuing the checking.
Also catch a NULL pointer dereference.

gcc/fortran/ChangeLog:

PR fortran/100274
* interface.c (gfc_compare_actual_formal): Continue checks after
emitting warning for argument length mismatch.
* trans-expr.c (gfc_conv_procedure_call): Check for NULL pointer
dereference.

gcc/testsuite/ChangeLog:

PR fortran/100274
* gfortran.dg/argument_checking_25.f90: New test.

(cherry picked from commit a8b79cc939d6786293f654c42a2d1b0ab040de0e)
gcc/fortran/interface.c
gcc/fortran/trans-expr.c
gcc/testsuite/gfortran.dg/argument_checking_25.f90 [new file with mode: 0644]
This page took 0.065087 seconds and 6 git commands to generate.