This is an archive of the discontinued LLVM Phabricator instance.

[Fortran] Re-enable FCVS FM905 & FM907
ClosedPublic

Authored by rovka on Aug 12 2022, 2:23 AM.

Details

Summary

FM905 and FM907 have been disabled because they use list-directed
output, which gives the compiler some freedom regarding the exact format
and precision of the output. Our reference output had been obtained with
gfortran, and flang's output did not match.

This patch re-enables the tests, but switches the reference outputs to
match what flang produces. By default, we will check the output exactly.
However, the patch also introduces a new CMake variable,
FCVS_ALLOW_FLEXIBLE_OUTPUT, which can be set when running the
test-suite with other compilers (or even with other flags or environment
variables) and which will check the output more loosely. In this patch,
this only affect whether or not we ignore whitespace differences in the
output.

Note that this patch is not enough for the test-suite to pass with
gfortran, even when FCVS_ALLOW_FLEXIBLE_OUTPUT is enabled. Future
patches will try to fix that on a best-effort basis. Other fixes may be
required for other compilers or other compiler options.

Diff Detail

Repository
rT test-suite

Event Timeline

rovka created this revision.Aug 12 2022, 2:23 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 12 2022, 2:23 AM
rovka requested review of this revision.Aug 12 2022, 2:23 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 12 2022, 2:23 AM
rovka changed the repository for this revision from rG LLVM Github Monorepo to rT test-suite.Aug 12 2022, 2:24 AM
This revision is now accepted and ready to land.Aug 12 2022, 5:54 AM
rovka added a comment.Aug 15 2022, 4:22 AM

Good catch, thanks! I'll update the CMakeLists.txt. I don't think the README needs to be updated, since the changes only affect the reference outputs, which weren't part of the original sources.

This revision was landed with ongoing or failed builds.Aug 16 2022, 1:28 AM
This revision was automatically updated to reflect the committed changes.

These are failing on https://lab.llvm.org/buildbot/#/builders/179/builds/4259, if you didn't already know.

Not sure why it took ~4 days to show up though.

Sorry, this is because the buildbot is still running the test-suite with
flang-to-external-fc instead of flang-new. It seems only the staging
buildmaster got restarted to include the change to flang-new :(