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

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