aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/array.cc
diff options
context:
space:
mode:
authorSteve Kargl <kargl@gcc.gnu.org>2023-01-25 20:38:43 +0100
committerHarald Anlauf <anlauf@gmx.de>2023-01-25 20:44:40 +0100
commit9fb9da3d38513d320bfea72050f7a59688595e0b (patch)
tree1a02abd4bbc401cac0bc2340e5d7ccbe4471d83e /gcc/fortran/array.cc
parent80cf2c5e8f496bed9c6facf55f9ae31d0d90fd28 (diff)
downloadgcc-9fb9da3d38513d320bfea72050f7a59688595e0b.zip
gcc-9fb9da3d38513d320bfea72050f7a59688595e0b.tar.gz
gcc-9fb9da3d38513d320bfea72050f7a59688595e0b.tar.bz2
Fortran: ICE in gfc_compare_array_spec [PR108528]
gcc/fortran/ChangeLog: PR fortran/108528 * array.cc (compare_bounds): Return false instead of generating an internal error on an invalid argument type. gcc/testsuite/ChangeLog: PR fortran/108528 * gfortran.dg/pr108528.f90: New test.
Diffstat (limited to 'gcc/fortran/array.cc')
-rw-r--r--gcc/fortran/array.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/fortran/array.cc b/gcc/fortran/array.cc
index e8a2c32..be5eb8b 100644
--- a/gcc/fortran/array.cc
+++ b/gcc/fortran/array.cc
@@ -967,7 +967,7 @@ gfc_copy_array_spec (gfc_array_spec *src)
/* Returns nonzero if the two expressions are equal.
- We should not need to support more than constant values, as that’s what is
+ We should not need to support more than constant values, as that's what is
allowed in derived type component array spec. However, we may create types
with non-constant array spec for dummy variable class container types, for
which the _data component holds the array spec of the variable declaration.
@@ -979,7 +979,7 @@ compare_bounds (gfc_expr *bound1, gfc_expr *bound2)
if (bound1 == NULL || bound2 == NULL
|| bound1->ts.type != BT_INTEGER
|| bound2->ts.type != BT_INTEGER)
- gfc_internal_error ("gfc_compare_array_spec(): Array spec clobbered");
+ return false;
/* What qualifies as identical bounds? We could probably just check that the
expressions are exact clones. We avoid rewriting a specific comparison