Blame SOURCES/0001-Work-around-gcc-miscompile.patch

d4a856
From 0f97b7209eed4a428171af6044fe7e0aaf81ee2a Mon Sep 17 00:00:00 2001
d4a856
From: Nikita Popov <npopov@redhat.com>
d4a856
Date: Thu, 3 Feb 2022 10:34:44 +0100
d4a856
Subject: [PATCH] Work around gcc miscompile
d4a856
d4a856
This works around https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104334,
d4a856
which miscompiles clang on s390x and ppc64le. The issue is already
d4a856
fixed on the gcc side, but including this as a temporary workaround
d4a856
to get a working build.
d4a856
---
d4a856
 clang/lib/Sema/DeclSpec.cpp | 5 +++--
d4a856
 1 file changed, 3 insertions(+), 2 deletions(-)
d4a856
d4a856
diff --git a/clang/lib/Sema/DeclSpec.cpp b/clang/lib/Sema/DeclSpec.cpp
d4a856
index d4dc790c008a..77a1e6c32c6f 100644
d4a856
--- a/clang/lib/Sema/DeclSpec.cpp
d4a856
+++ b/clang/lib/Sema/DeclSpec.cpp
d4a856
@@ -1203,8 +1203,9 @@ void DeclSpec::Finish(Sema &S, const PrintingPolicy &Policy) {
d4a856
     } else if (TypeSpecType == TST_double) {
d4a856
       // vector long double and vector long long double are never allowed.
d4a856
       // vector double is OK for Power7 and later, and ZVector.
d4a856
-      if (getTypeSpecWidth() == TypeSpecifierWidth::Long ||
d4a856
-          getTypeSpecWidth() == TypeSpecifierWidth::LongLong)
d4a856
+      TypeSpecifierWidth TypeSpecWidth = getTypeSpecWidth();
d4a856
+      if (TypeSpecWidth == TypeSpecifierWidth::Long ||
d4a856
+          TypeSpecWidth == TypeSpecifierWidth::LongLong)
d4a856
         S.Diag(TSWRange.getBegin(),
d4a856
                diag::err_invalid_vector_long_double_decl_spec);
d4a856
       else if (!S.Context.getTargetInfo().hasFeature("vsx") &&
d4a856
--
d4a856
2.34.1
d4a856
d4a856