fortran : ICE in gfc_resolve_findloc PR93498
commit2c54eab5a302c6da015bb39b1a81f6799e45a650
authorMark Eggleston <markeggleston@gcc.gnu.org>
Thu, 2 Apr 2020 06:31:12 +0000 (2 07:31 +0100)
committerMark Eggleston <markeggleston@gcc.gnu.org>
Thu, 2 Apr 2020 06:31:12 +0000 (2 07:31 +0100)
tree0e65bf74cb366cdcff9a9f5fa4c92194e1a4c1ab
parentbf1f6d8819ade074271df718f01fd3a5a9dc1b82
fortran : ICE in gfc_resolve_findloc PR93498

ICE occurs when findloc is used with character arguments of different
kinds.  If the character kinds are different reject the code.

Original patch provided by Steven G. Kargl  <kargl@gcc.gnu.org>.

gcc/fortran/ChangeLog:

PR fortran/93498
* check.c (gfc_check_findloc):  If the kinds of the arguments
differ goto label "incompat".

gcc/testsuite/ChangeLog:

PR fortran/93498
* gfortran.dg/pr93498_1.f90:  New test.
* gfortran.dg/pr93498_2.f90:  New test.
gcc/fortran/ChangeLog
gcc/fortran/check.c
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/pr93498_1.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/pr93498_2.f90 [new file with mode: 0644]