1 ! RUN: %S/test_errors.sh %s %t %flang_fc1
3 ! Test comparisons that use the intrinsic SHAPE() as an operand
6 subroutine sub1(arrayDummy
)
7 integer :: arrayDummy(:)
8 integer, allocatable
:: arrayDeferred(:)
9 integer :: arrayLocal(2) = [88, 99]
10 !ERROR: Dimension 1 of left operand has extent 1, but right operand has extent 0
11 !ERROR: Dimension 1 of left operand has extent 1, but right operand has extent 0
12 if (all(shape(arrayDummy
)==shape(8))) then
15 !ERROR: Dimension 1 of left operand has extent 0, but right operand has extent 1
16 !ERROR: Dimension 1 of left operand has extent 0, but right operand has extent 1
17 if (all(shape(27)==shape(arrayDummy
))) then
20 if (all(64==shape(arrayDummy
))) then
23 !ERROR: Dimension 1 of left operand has extent 1, but right operand has extent 0
24 !ERROR: Dimension 1 of left operand has extent 1, but right operand has extent 0
25 if (all(shape(arrayDeferred
)==shape(8))) then
28 !ERROR: Dimension 1 of left operand has extent 0, but right operand has extent 1
29 !ERROR: Dimension 1 of left operand has extent 0, but right operand has extent 1
30 if (all(shape(27)==shape(arrayDeferred
))) then
33 if (all(64==shape(arrayDeferred
))) then
36 !ERROR: Dimension 1 of left operand has extent 1, but right operand has extent 0
37 !ERROR: Dimension 1 of left operand has extent 1, but right operand has extent 0
38 if (all(shape(arrayLocal
)==shape(8))) then
41 !ERROR: Dimension 1 of left operand has extent 0, but right operand has extent 1
42 !ERROR: Dimension 1 of left operand has extent 0, but right operand has extent 1
43 if (all(shape(27)==shape(arrayLocal
))) then
46 if (all(64==shape(arrayLocal
))) then