This is an archive of the discontinued LLVM Phabricator instance.

[flang][NFC] Make semantics test dosemantics03.f90 warning-correct
ClosedPublic

Authored by ekieri on May 22 2022, 1:30 PM.

Details

Summary

This is a preparation for D125804, which makes test_errors.py test
warnings the same way it already tests errors, i.e., assert that the
emitted and expected errors are identical. The following changes are
made to the test:

  • Add the WARNING directive where warnings are expected.
  • Remove -Werror in the RUN line. It does not serve much purpose here: with -Werror flang makes compilation fail in the presence of warnings, but warnings are still printed as warnings and not as errors. And I anyway find it better to test the warnings as warnings instead of promoting them and test both warnings and errors as errors.
  • Update the header comment describing the test case, mostly in response to the removal of -Werror.
  • Remove the reference to 'issue 458', referring to https://github.com/flang-compiler/f18/issues/458, from the header. I think the relevant reference here is to C1120 of the standard, and references to bug trackers from other projects (from before upstreaming) can be confusing.

Diff Detail

Event Timeline

ekieri created this revision.May 22 2022, 1:30 PM
Herald added projects: Restricted Project, Restricted Project. · View Herald Transcript
ekieri requested review of this revision.May 22 2022, 1:30 PM
PeteSteinfeld accepted this revision.May 24 2022, 10:02 AM

Looks good!

Thanks for cleaning this up.

This revision is now accepted and ready to land.May 24 2022, 10:02 AM