[flang] Accept polymorphic component element in storage_size
[llvm-project.git] / flang / test / Semantics / if_arith04.f90
blob6e98b5397f5dcc30fc0093691a74a12abc5f81a5
1 ! RUN: %python %S/test_errors.py %s %flang_fc1
2 ! Make sure arithmetic if expressions are non-complex numeric exprs.
4 INTEGER I
5 COMPLEX Z
6 LOGICAL L
7 INTEGER, DIMENSION (2) :: B
9 if ( I ) 100, 200, 300
10 100 CONTINUE
11 200 CONTINUE
12 300 CONTINUE
14 !ERROR: ARITHMETIC IF expression must not be a COMPLEX expression
15 if ( Z ) 101, 201, 301
16 101 CONTINUE
17 201 CONTINUE
18 301 CONTINUE
20 !ERROR: ARITHMETIC IF expression must be a numeric expression
21 if ( L ) 102, 202, 302
22 102 CONTINUE
23 202 CONTINUE
24 302 CONTINUE
26 !ERROR: ARITHMETIC IF expression must be a scalar expression
27 if ( B ) 103, 203, 303
28 103 CONTINUE
29 203 CONTINUE
30 303 CONTINUE
32 END