Skip to content

Commit ce800c2

Browse files
committed
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
1 parent 88f0e4c commit ce800c2

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

clang/test/Sema/code_align.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,19 +75,23 @@ void foo1(int A)
7575
[[clang::code_align(9223372036854775808)]]
7676
for(int I=0; I<256; ++I) { bar(I); }
7777

78+
#ifdef __SIZEOF_INT128__
7879
// expected-error@+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}}
7980
[[clang::code_align((__int128_t)0x1234567890abcde0ULL << 64)]]
8081
for(int I=0; I<256; ++I) { bar(I); }
82+
#endif
8183

8284
// expected-error@+1 {{'code_align' attribute requires an integer argument which is a constant power of two between 1 and 4096 inclusive; provided argument was -922337203685477}}
8385
[[clang::code_align(-922337203685477)]]
8486
for(int I=0; I<256; ++I) { bar(I); }
8587

88+
#ifdef __SIZEOF_INT128__
8689
// cpp-local-error@+3{{expression is not an integral constant expression}}
8790
// cpp-local-note@+2{{left shift of negative value -1311768467294899680}}
8891
// c-local-error@+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}}
8992
[[clang::code_align(-(__int128_t)0x1234567890abcde0ULL << 64)]]
9093
for(int I=0; I<256; ++I) { bar(I); }
94+
#endif
9195

9296
// cpp-local-error@+3{{expression is not an integral constant expression}}
9397
// cpp-local-note@+2{{function parameter 'A' with unknown value cannot be used in a constant expression}}

0 commit comments

Comments
 (0)