]> git.ipfire.org Git - people/ms/gcc.git/commit
Fortran: avoid ICE on invalid array subscript triplets [PR108501]
authorHarald Anlauf <anlauf@gmx.de>
Mon, 23 Jan 2023 20:19:03 +0000 (21:19 +0100)
committerHarald Anlauf <anlauf@gmx.de>
Sat, 4 Feb 2023 15:15:25 +0000 (16:15 +0100)
commit76a6f8470c8c786b271cb0d897de891fe0d4043f
treef93d1494e0bcb49b368b4244083264a4015bf5be
parentd7ec0bdfeae883d852d7c0dfc67766a3793f5892
Fortran: avoid ICE on invalid array subscript triplets [PR108501]

gcc/fortran/ChangeLog:

PR fortran/108501
* interface.c (get_expr_storage_size): Check array subscript triplets
that we actually have integer values before trying to extract with
mpz_get_si.

gcc/testsuite/ChangeLog:

PR fortran/108501
* gfortran.dg/pr108501.f90: New test.

(cherry picked from commit 771d793df1622a476e1cf8d05f0a6aee350fa56b)
gcc/fortran/interface.c
gcc/testsuite/gfortran.dg/pr108501.f90 [new file with mode: 0644]