Files
clang-p2996/flang/test/Semantics/if_construct01.f90
Michael Kruse 58c3f20bbf [flang][windows] Run regression tests under Windows. NFCI.
Allow the lit test suite to run under Windows. This encompasses the following changes:

 * Define `lit_tools_dir` for flang's test configuration
 * Replace `(<command> || true)` idiom with `not <command>`
 * Add `REQUIRES: shell` on tests that invoke a shell script

Reviewed By: awarzynski

Differential Revision: https://reviews.llvm.org/D89368
2021-06-10 05:13:44 -05:00

54 lines
584 B
Fortran

! RUN: %S/test_errors.sh %s %t %flang_fc1
! REQUIRES: shell
! Simple check that if constructs are ok.
if (a < b) then
a = 1
end if
if (a < b) then
a = 2
else
a = 3
endif
if (a < b) then
a = 4
else if(a == b) then
a = 5
end if
if (a < b) then
a = 6
else if(a == b) then
a = 7
elseif(a > b) then
a = 8
end if
if (a < b) then
a = 9
else if(a == b) then
a = 10
else
a = 11
end if
if (a < b) then
a = 12
else if(a == b) then
a = 13
else if(a > b) then
a = 14
end if
if (f()) then
a = 15
end if
contains
logical function f()
f = .true.
end
end