brintos

brintos / llvm-project-archived public Read only

0
0
Text · 274 B · 6414bbf Raw
19 lines · c
1// RUN: %clang_tysan -O0 %s -o %t && %run %t >%t.out 2>&12// RUN: FileCheck %s < %t.out3 4#include <stdio.h>5 6// CHECK-NOT: ERROR: TypeSanitizer: type-aliasing-violation7 8int main() {9  union {10    int i;11    short s;12  } u;13 14  u.i = 42;15  u.s = 1;16 17  printf("%d\n", u.i);18}19