This is an archive of the discontinued LLVM Phabricator instance.

[flang] [NFC] Repair build with GCC 7.3
ClosedPublic

Authored by klausler on Jun 22 2021, 11:34 AM.

Details

Summary

Work around two problems with GCC 7.3.
One is its inability to implement "constexpr operator=(...) = default;"
in a class with a std::optional<> component; another is a legitimate-
looking warning about an unused variable.

Diff Detail

Event Timeline

klausler created this revision.Jun 22 2021, 11:34 AM
clementval accepted this revision.Jun 22 2021, 12:31 PM
clementval added a subscriber: clementval.

LGTM.

We experienced the bug in our CI on Summit and this patch fixes the problem for us. We test with GCC 7.5.

This revision is now accepted and ready to land.Jun 22 2021, 12:31 PM
This revision was landed with ongoing or failed builds.Jun 22 2021, 1:52 PM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptJun 22 2021, 1:52 PM

Thanks! FWIW, the same issue also crops up if compiling with clang in an environment that uses libstdc++ from GCC 7 (i.e. building with clang on Ubuntu 18.04), I'll send a separate patch for fixing that.

Also note that building flang seems to fail entirely after D104167, see e.g. https://lab.llvm.org/buildbot/#/builders/132.

lei added a subscriber: lei.Jun 23 2021, 6:39 AM

This broke the flang bot: https://lab.llvm.org/buildbot/#/builders/21/builds/17760
Please provide fix or pull the patch to unblock the bot.

This broke the flang bot: https://lab.llvm.org/buildbot/#/builders/21/builds/17760
Please provide fix or pull the patch to unblock the bot.

The bot started to fail after a change in mlir and not after this patch.