17 lines · c
1// Test globals with LTO, since it invokes the integrated assembler separately.2// RUN: %clang_hwasan -flto %s -o %t3// RUN: not %run %t 1 2>&1 | FileCheck %s4 5// REQUIRES: pointer-tagging6 7#include <stdlib.h>8 9int x = 1;10 11int main(int argc, char **argv) {12 // CHECK: Cause: global-overflow13 // CHECK: is located 0 bytes after a 4-byte global variable x {{.*}} in {{.*}}lto.c.tmp14 // CHECK-NOT: can not describe15 (&x)[atoi(argv[1])] = 1;16}17