This is an archive of the discontinued LLVM Phabricator instance.

flang] IEEE_ARITHMETIC must imply USE IEEE_EXCEPTIONS
ClosedPublic

Authored by klausler on Mar 11 2022, 1:27 PM.

Details

Summary

[The intrinsic module IEEE_ARITHMETIC must incorporate the public
names from the intrisic module IEEE_EXCEPTIONS. Rename IEEE_EXCEPTIONS
to __Fortran_ieee_exceptions so that it won't clash with the
nonintrinsic namespace, establish a new intrinic IEEE_EXCEPTIONS
module that USEs it, and add a USE to IEEE_ARITHMETIC.

Diff Detail

Event Timeline

klausler created this revision.Mar 11 2022, 1:27 PM
Herald added a project: Restricted Project. · View Herald Transcript
klausler requested review of this revision.Mar 11 2022, 1:27 PM
vdonaldson accepted this revision.Mar 11 2022, 1:30 PM
This revision is now accepted and ready to land.Mar 11 2022, 1:30 PM
This revision was landed with ongoing or failed builds.Mar 14 2022, 10:41 AM
This revision was automatically updated to reflect the committed changes.

This patch leads to build failures:

ninja: error: dependency cycle: include/flang/__fortran_ieee_exceptions.mod -> include/flang/__fortran_ieee_exceptions.mod

See e.g.:

In order to reproduce:

cmake -G Ninja \
  -DLLVM_TARGETS_TO_BUILD=host \
  -DCMAKE_BUILD_TYPE=Release \
  -DLLVM_ENABLE_PROJECTS="clang;flang" \
  ../../llvm
ninja check-flang
awarzynski added inline comments.Mar 14 2022, 11:17 AM
flang/tools/f18/CMakeLists.txt
33

This leads to:

ninja: error: dependency cycle: include/flang/__fortran_ieee_exceptions.mod -> include/flang/__fortran_ieee_exceptions.mod

I'm not sure what the intention of this was. Is it needed at all?

klausler updated this revision to Diff 415182.Mar 14 2022, 12:09 PM

Use STREQUAL rather than MATCHES in CMakeLists.txt to avoid ambiguity.

klausler updated this revision to Diff 415197.Mar 14 2022, 1:16 PM

Use STREQUAL rather than MATCHES in CMakeLists.txt to avoid confusing Ninja.

Makes sense, thank you! Could you wait for the pre-merge CI before merging?