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

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