https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102787
--- Comment #1 from anlauf at gcc dot gnu.org ---
Interesting. Cannot reproduce on x86_64-pc-linux-gnu.
However, changing the testcase as follows:
program p
integer, parameter :: a(1) = 2
! integer, parameter :: b(2) = reshape([3,4], -[a]) !
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102787
--- Comment #2 from anlauf at gcc dot gnu.org ---
The wrong locus for comment#1 is fixed by:
diff --git a/gcc/fortran/check.c b/gcc/fortran/check.c
index cfaf9d26bbc..bfb371b82c9 100644
--- a/gcc/fortran/check.c
+++ b/gcc/fortran/check.c
@@ -474