return false;
}
}
-
- /* coranks have to be equal or one has to be zero to be combinable. */
- if (op1->corank == op2->corank || (op1->corank != 0 && op2->corank == 0))
- {
- e->corank = op1->corank;
- /* Only do this, when regular array has not set a shape yet. */
- if (e->shape == NULL)
- {
- if (op1->corank != 0)
- {
- e->shape = gfc_copy_shape (op1->shape, op1->corank);
- }
- }
- }
- else if (op1->corank == 0 && op2->corank != 0)
- {
- e->corank = op2->corank;
- /* Only do this, when regular array has not set a shape yet. */
- if (e->shape == NULL)
- e->shape = gfc_copy_shape (op2->shape, op2->corank);
- }
- else if ((op1->ref && !gfc_ref_this_image (op1->ref))
- || (op2->ref && !gfc_ref_this_image (op2->ref)))
- {
- gfc_error ("Inconsistent coranks for operator at %L and %L",
- &op1->where, &op2->where);
- return false;
- }
-
break;
case INTRINSIC_PARENTHESES:
program p
implicit none
- integer, allocatable :: arr(:,:) [:,:]
+ type T
+ integer, allocatable :: arr(:,:) [:,:]
+ end type
+
+ type(T) :: o
+ integer, allocatable :: vec(:)[:,:]
integer :: c[*]
c = 7
- allocate(arr(4,3)[2,*], source=6)
+ allocate(o%arr(4,3)[2,*], source=6)
+ allocate(vec(10)[1,*], source=7)
- if (arr(2,2)* c /= 42) stop 1
+ if (vec(3) * c /= 49) stop 1
+ if (o%arr(2,2)* c /= 42) stop 2
end program p