Author: erichkeane Date: Fri Oct 11 09:30:45 2019 New Revision: 374569 URL: http://llvm.org/viewvc/llvm-project?rev=374569&view=rev Log: 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. Modified: cfe/trunk/test/Sema/builtin-assume-aligned.c Modified: cfe/trunk/test/Sema/builtin-assume-aligned.c URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/builtin-assume-aligned.c?rev=374569&r1=374568&r2=374569&view=diff ============================================================================== --- cfe/trunk/test/Sema/builtin-assume-aligned.c (original) +++ cfe/trunk/test/Sema/builtin-assume-aligned.c Fri Oct 11 09:30:45 2019 @@ -59,6 +59,6 @@ void *test_no_fn_proto() __attribute__(( 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]; } _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits