===================================================================
@@ -871,7 +871,7 @@ merge_array_spec (gfc_array_spec *from, gfc_array_spec
}
}
- if (to->rank + to->corank >= GFC_MAX_DIMENSIONS)
+ if (to->rank + to->corank > GFC_MAX_DIMENSIONS)
{
gfc_error ("Sum of array rank %d and corank %d at %C exceeds maximum "
"allowed dimensions of %d",
===================================================================
@@ -1,5 +1,6 @@
! { dg-do compile }
! { dg-options "-fcoarray=single" }
program p
+real, dimension(1,2,1,2,1,2,1,2), codimension[1,2,1,2,1,2,*] :: y
real, dimension(1,2,1,2,1,2,1,2), codimension[1,2,1,2,1,2,1,*] :: z ! { dg-error "allowed dimensions" }
end