Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / compiler-rt / test / sanitizer_common / TestCases / Posix / illegal_read_test.cpp
blob45d3f256378fc5c7a1a011479f2afd2ef020cc11
1 // Test that there was an illegal READ memory access.
2 // Fails with debug checks: https://bugs.llvm.org/show_bug.cgi?id=46860
3 // XFAIL: !compiler-rt-optimized && tsan
4 // RUN: %clangxx -O0 %s -o %t && not %run %t 2>&1 | FileCheck %s
6 // REQUIRES: stable-runtime
7 // XFAIL: target={{(powerpc64|s390x).*}}
9 volatile int *null = 0;
10 volatile int a;
12 int main(int argc, char **argv) {
13 a = *null;
14 return 0;
17 // CHECK: The signal is caused by a READ memory access.