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

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