diff options
author | Erich Keane <erich.keane@intel.com> | 2019-10-11 16:30:45 +0000 |
---|---|---|
committer | Erich Keane <erich.keane@intel.com> | 2019-10-11 16:30:45 +0000 |
commit | add0786dbaa8ca9c0b44b5eefcf700c15a0c8e44 (patch) | |
tree | 5a59ccae9a51fa5cc22dca53d2bad4218fc98907 | |
parent | 781c49de9c760f621412f13ea108f3b342a10432 (diff) | |
download | bcm5719-llvm-add0786dbaa8ca9c0b44b5eefcf700c15a0c8e44.tar.gz bcm5719-llvm-add0786dbaa8ca9c0b44b5eefcf700c15a0c8e44.zip |
Fix test failure with 374562 on Hexagon
__builtin_assume_aligned takes a size_t which is a 32 bit int on
hexagon. Thus, the constant gets converted to a 32 bit value, resulting
in 0 not being a power of 2. This patch changes the constant being
passed to 2**30 so that it fails, but doesnt exceed 30 bits.
llvm-svn: 374569
-rw-r--r-- | clang/test/Sema/builtin-assume-aligned.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/test/Sema/builtin-assume-aligned.c b/clang/test/Sema/builtin-assume-aligned.c index 9411cb4e638..565dc660944 100644 --- a/clang/test/Sema/builtin-assume-aligned.c +++ b/clang/test/Sema/builtin-assume-aligned.c @@ -59,6 +59,6 @@ void *test_no_fn_proto() __attribute__((assume_aligned())); // expected-error {{ void *test_no_fn_proto() __attribute__((assume_aligned(32, 45, 37))); // expected-error {{'assume_aligned' attribute takes no more than 2 arguments}} int pr43638(int *a) { - a = __builtin_assume_aligned(a, 4294967296); // expected-warning {{requested alignment must be 536870912 bytes or smaller; maximum alignment assumed}} + a = __builtin_assume_aligned(a, 1073741824); // expected-warning {{requested alignment must be 536870912 bytes or smaller; maximum alignment assumed}} return a[0]; } |