]> git.ipfire.org Git - people/ms/gcc.git/commit
Fortran: incorrect array bounds when bound intrinsic used in decl [PR108131]
authorHarald Anlauf <anlauf@gmx.de>
Sat, 17 Dec 2022 21:04:32 +0000 (22:04 +0100)
committerHarald Anlauf <anlauf@gmx.de>
Sun, 8 Jan 2023 20:52:45 +0000 (21:52 +0100)
commitba5012875bc6f7910be3b5cce03e000aa9322c1f
treecd0d128630c4031555179f5f1f0e2353ab9a9ec6
parent8bbdc1984bd37dd01e75af29d27624433dc204ea
Fortran: incorrect array bounds when bound intrinsic used in decl [PR108131]

gcc/fortran/ChangeLog:

PR fortran/108131
* array.c (match_array_element_spec): Avoid too early simplification
of matched array element specs that can lead to a misinterpretation
when used as array bounds in array declarations.

gcc/testsuite/ChangeLog:

PR fortran/108131
* gfortran.dg/pr103505.f90: Adjust expected patterns.
* gfortran.dg/pr108131.f90: New test.

(cherry picked from commit 6a95f0e0a06d78d94138d4c3dd64d41591197281)
gcc/fortran/array.c
gcc/testsuite/gfortran.dg/pr103505.f90
gcc/testsuite/gfortran.dg/pr108131.f90 [new file with mode: 0644]