diff options
Diffstat (limited to 'gcc/fortran/decl.c')
-rw-r--r-- | gcc/fortran/decl.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/fortran/decl.c b/gcc/fortran/decl.c index 01693ad..66e2ca8 100644 --- a/gcc/fortran/decl.c +++ b/gcc/fortran/decl.c @@ -594,6 +594,9 @@ merge_array_spec (gfc_array_spec *from, gfc_array_spec *to, bool copy) { int i; + gcc_assert (from->rank != -1 || to->corank == 0); + gcc_assert (to->rank != -1 || from->corank == 0); + if (to->rank == 0 && from->rank > 0) { to->rank = from->rank; |