mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-17 15:56:40 +00:00

To enable Flang testing on Windows, shell scripts have to be ported to Python. In this patch the "test_errors.sh" script is ported to python ("test_errors.py"). The RUN line of existing tests was changed to make use of the python script. Used python regex in place of awk/sed. Reviewed By: Meinersbur Differential Revision: https://reviews.llvm.org/D107575
33 lines
621 B
Fortran
33 lines
621 B
Fortran
! RUN: %python %S/test_errors.py %s %flang_fc1
|
|
! Make sure arithmetic if expressions are non-complex numeric exprs.
|
|
|
|
INTEGER I
|
|
COMPLEX Z
|
|
LOGICAL L
|
|
INTEGER, DIMENSION (2) :: B
|
|
|
|
if ( I ) 100, 200, 300
|
|
100 CONTINUE
|
|
200 CONTINUE
|
|
300 CONTINUE
|
|
|
|
!ERROR: ARITHMETIC IF expression must not be a COMPLEX expression
|
|
if ( Z ) 101, 201, 301
|
|
101 CONTINUE
|
|
201 CONTINUE
|
|
301 CONTINUE
|
|
|
|
!ERROR: ARITHMETIC IF expression must be a numeric expression
|
|
if ( L ) 102, 202, 302
|
|
102 CONTINUE
|
|
202 CONTINUE
|
|
302 CONTINUE
|
|
|
|
!ERROR: ARITHMETIC IF expression must be a scalar expression
|
|
if ( B ) 103, 203, 303
|
|
103 CONTINUE
|
|
203 CONTINUE
|
|
303 CONTINUE
|
|
|
|
END
|