Skip to content

Commit

Permalink
Reland "[Fortran] Re-enable FCVS FM905 & FM907"
Browse files Browse the repository at this point in the history
This reverts commit f024050.
The buildmaster has been restarted and the buildbots are now running the
test-suite with flang-new instead of flang-to-external-fc. We should be
able to re-enable the tests.
  • Loading branch information
rovka committed Aug 19, 2022
1 parent f024050 commit 7363246
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 21 deletions.
19 changes: 13 additions & 6 deletions Fortran/UnitTests/fcvs21_f95/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
# Thread model: posix
# gcc version 7.5.0 (Ubuntu 7.5.0-3ubuntu1~18.04)
#
# Reference results for tests 905 and 907 generated with flang ~15.0.0 on
# Ubuntu 20.04 (aarch64-unknown-linux-gnu).
#
# See additional comments in `driver_run` script should reference
# results ever need to be updated.
#
Expand All @@ -33,19 +36,23 @@
# clean-up fort.* files otherwise one of the tests will fail
llvm_test_prepare(rm -f %S/fort.*)

# Different compilers or different compiler options may produce slightly
# different but still valid outputs for some of these tests. By default, we will
# check that the outputs match the reference outputs exactly. However, when this
# option is set, we will check less strictly.
option(FCVS_ALLOW_FLEXIBLE_OUTPUT "Don't match the output of FCVS tests exactly")

# Group 1:
# Tests 905 and 907 use list-directed output, for which the standard allows some
# flexibility, e.g., with regards to how many white space characters or
# floating point decimals to print. Treat them separately.
# FIXME: Reenable these tests after moving the buildbots from using
# flang-to-external-fc to using flang-new.
set(SPECIAL_CASES "FM905.f" "FM907.f")
if (NOT CMAKE_Fortran_COMPILER_ID STREQUAL "LLVMFlang")
set(Source ${SPECIAL_CASES})
set(Source ${SPECIAL_CASES})
if (FCVS_ALLOW_FLEXIBLE_OUTPUT)
set(FP_IGNOREWHITESPACE ON)
llvm_singlesource()
set(Source)
endif()
llvm_singlesource()
set(Source)

# Group 2:
# Generic case. Make sure to exclude the special cases which have already been
Expand Down
15 changes: 8 additions & 7 deletions Fortran/UnitTests/fcvs21_f95/FM905.reference_output
Original file line number Diff line number Diff line change
Expand Up @@ -27,22 +27,22 @@

1 INSPECT
COMPUTED=
2
2
CORRECT=
2
2 INSPECT
COMPUTED=
1 3 5 7 9
1 3 5 7 9
CORRECT=
1 3 5 7 9
3 INSPECT
COMPUTED=
2.50000000
2.5
CORRECT=
2.5
4 INSPECT
COMPUTED=
2.50000003E-11 0.250000000 250.000000 2.50000000E+09
2.5E-11 .25 250. 2.5E+09
CORRECT=
2.5E-11 0.25 250.0 2.5E+09
5 INSPECT
Expand All @@ -57,7 +57,7 @@
ONE TWO THREEFOUR
7 INSPECT
COMPUTED=
-3 15.2500000 HELLO T
-3 15.25 HELLO T
CORRECT=
-3 15.25 HELLO T
8 INSPECT
Expand All @@ -67,13 +67,14 @@
5 O'CLOCK
9 INSPECT
COMPUTED=
SHORTTHIS IS A LONGER CHARACTER STRING123456789012345678901234567890123456789012345678901234567890123456789012
SHORTTHIS IS A LONGER CHARACTER STRING1234567890123456789012345678901234567890
12345678901234567890123456789012
CORRECT=
SHORT THIS IS A LONGER CHARACTER STRING 123456789012345678901234567890123456789
012345678901234567890123456789012
10 INSPECT
COMPUTED=
5 5 5 5 5
5 5 5 5 5
CORRECT=
5 5 5 5 5 OR 5*5

Expand Down
16 changes: 8 additions & 8 deletions Fortran/UnitTests/fcvs21_f95/FM907.reference_output
Original file line number Diff line number Diff line change
Expand Up @@ -29,42 +29,42 @@

1 INSPECT
COMPUTED=
2.5000000000000000
2.5
CORRECT=
2.5
2 INSPECT
COMPUTED=
(3.00000000,4.00000000)
(3.,4.)
CORRECT=
(3.0,4.0)
3 INSPECT
COMPUTED=
2.5000000000000000 2.5000000000000002E-010 25000000000.000000
2.5 2.5E-10 25000000000.
CORRECT=
2.5 2.5D-10 2.5D+10
4 INSPECT
COMPUTED=
(0.00000000,1.00000000) (8.00000000,10.0000000) (-5.00000000,0.00000000) (0.00000000,0.00000000)
(0.,1.) (8.,10.) (-5.,0.) (0.,0.)
CORRECT=
(0.0,1.0) (8.0,10.0) (-5.0,0.0) (0.0,0.0)
5 INSPECT
COMPUTED=
(3.00000000,4.00000000) 5.0000000000000000 -5.0000000000000000 (-3.00000000,-4.00000000)
(3.,4.) 5. -5. (-3.,-4.)
CORRECT=
(3.0,4.0) 5.0 -5.0 (-3.0,-4.0)
6 INSPECT
COMPUTED=
(6.00000000,9.00000000)
(6.,9.)
CORRECT=
(6.0,9.0)
7 INSPECT
COMPUTED=
3.25000000
3.25
CORRECT=
3.25
8 INSPECT
COMPUTED=
(2.00000000,-3.00000000) T 15.6250000 GOODBYE FOR NOW
(2.,-3.) T 15.625 GOODBYE FOR NOW
CORRECT=
(2.0,-3.0) T 15.625 GOODBYE FOR NOW

Expand Down

0 comments on commit 7363246

Please sign in to comment.