[clang] ce800c2 - Fix clang/test/Sema/code_align.c for Arm v7 #70762

Muhammad Omair Javaid via cfe-commits cfe-commits at lists.llvm.org
Tue Nov 21 00:05:08 PST 2023


Author: Muhammad Omair Javaid
Date: 2023-11-21T13:00:52+05:00
New Revision: ce800c27768400aa3efba882bcac120f2bdd6eeb

URL: https://github.com/llvm/llvm-project/commit/ce800c27768400aa3efba882bcac120f2bdd6eeb
DIFF: https://github.com/llvm/llvm-project/commit/ce800c27768400aa3efba882bcac120f2bdd6eeb.diff

LOG: Fix clang/test/Sema/code_align.c for Arm v7 #70762

This patch disables parts of clang/test/Sema/code_align.c that need
__int128_t to be defined. This will fix failures on Arm v7 buildbots
due to #70762

Following bots are failing:
https://lab.llvm.org/buildbot/#/builders/245
https://lab.llvm.org/buildbot/#/builders/178
https://lab.llvm.org/buildbot/#/builders/182
https://lab.llvm.org/buildbot/#/builders/186
https://lab.llvm.org/buildbot/#/builders/187

Added: 
    

Modified: 
    clang/test/Sema/code_align.c

Removed: 
    


################################################################################
diff  --git a/clang/test/Sema/code_align.c b/clang/test/Sema/code_align.c
index 539c0c0b0f1ccfb..2d1af7026a18156 100644
--- a/clang/test/Sema/code_align.c
+++ b/clang/test/Sema/code_align.c
@@ -75,19 +75,23 @@ void foo1(int A)
   [[clang::code_align(9223372036854775808)]]
   for(int I=0; I<256; ++I) { bar(I); }
 
+#ifdef __SIZEOF_INT128__
   // expected-error at +1{{'code_align' attribute requires an integer argument which is a constant power of two between 1 and 4096 inclusive; provided argument was (__int128_t)1311768467294899680ULL << 64}}
   [[clang::code_align((__int128_t)0x1234567890abcde0ULL << 64)]]
   for(int I=0; I<256; ++I) { bar(I); }
+#endif
 
   // expected-error at +1 {{'code_align' attribute requires an integer argument which is a constant power of two between 1 and 4096 inclusive; provided argument was -922337203685477}}
   [[clang::code_align(-922337203685477)]]
   for(int I=0; I<256; ++I) { bar(I); }
 
+#ifdef __SIZEOF_INT128__
   // cpp-local-error at +3{{expression is not an integral constant expression}}
   // cpp-local-note at +2{{left shift of negative value -1311768467294899680}}
   // c-local-error at +1{{'code_align' attribute requires an integer argument which is a constant power of two between 1 and 4096 inclusive; provided argument was -(__int128_t)1311768467294899680ULL << 64}}
   [[clang::code_align(-(__int128_t)0x1234567890abcde0ULL << 64)]]
   for(int I=0; I<256; ++I) { bar(I); }
+#endif
 
   // cpp-local-error at +3{{expression is not an integral constant expression}}
   // cpp-local-note at +2{{function parameter 'A' with unknown value cannot be used in a constant expression}}


        


More information about the cfe-commits mailing list