blob: ed6fff359296bf4830bd12db5fb1a7e8ec59f537 [file] [log] [blame]
// RUN: %clang -fsanitize=alignment %s -o %t && %run %t 2>&1 | FileCheck %s --check-prefixes=CHECK
#include <stdlib.h>
int main(int argc, char* argv[]) {
// CHECK-NOT: alignment-assumption
char *ptr = (char *)malloc(2);
__builtin_assume_aligned(ptr + 1, 0x8000);
// CHECK: alignment-assumption
// CHECK-NOT: alignment-assumption
free(ptr);
return 0;
}