Home | History | Annotate | Download | only in Misc
      1 // RUN: %clang -fsanitize=bool %s -O3 -o %T/bool.exe && %T/bool.exe 2>&1 | FileCheck %s
      2 
      3 unsigned char NotABool = 123;
      4 
      5 int main(int argc, char **argv) {
      6   bool *p = (bool*)&NotABool;
      7 
      8   // FIXME: Provide a better source location here.
      9   // CHECK: bool.exe:0x{{[0-9a-f]*}}: runtime error: load of value 123, which is not a valid value for type 'bool'
     10   return *p;
     11 }
     12