[flang-commits] [PATCH] D104779: [flang] Tweak the conditions for the GCC 7/libstdc++ workaround

Martin Storsjö via Phabricator via flang-commits flang-commits at lists.llvm.org
Wed Jun 23 13:20:06 PDT 2021


This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG2716c6faa46f: [flang] Tweak the conditions for the GCC 7/libstdc++ workaround (authored by mstorsjo).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D104779/new/

https://reviews.llvm.org/D104779

Files:
  flang/include/flang/Evaluate/type.h


Index: flang/include/flang/Evaluate/type.h
===================================================================
--- flang/include/flang/Evaluate/type.h
+++ flang/include/flang/Evaluate/type.h
@@ -142,7 +142,7 @@
     return charLengthParamValue_;
   }
   constexpr std::optional<std::int64_t> knownLength() const {
-#if !__clang__ && __GNUC__ == 7
+#if defined(_GLIBCXX_RELEASE) && _GLIBCXX_RELEASE == 7
     if (knownLength_ < 0) {
       return std::nullopt;
     }
@@ -222,7 +222,7 @@
   TypeCategory category_{TypeCategory::Derived}; // overridable default
   int kind_{0};
   const semantics::ParamValue *charLengthParamValue_{nullptr};
-#if !__clang__ && __GNUC__ == 7
+#if defined(_GLIBCXX_RELEASE) && _GLIBCXX_RELEASE == 7
   // GCC 7's optional<> lacks a constexpr operator=
   std::int64_t knownLength_{-1};
 #else


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D104779.354064.patch
Type: text/x-patch
Size: 824 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/flang-commits/attachments/20210623/a15a486c/attachment.bin>


More information about the flang-commits mailing list