Skip to content

Commit 6f79545

Browse files
committed
Changed test to check for output
1 parent 4f5a7f1 commit 6f79545

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

compiler-rt/test/tysan/struct-offset-different-base.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// RUN: %clangxx_tysan -O0 %s -o %t && %run %t >%t.out 2>&1
2-
// RUN: FileCheck %s < %t.out
2+
// RUN: FileCheck %s --implicit-check-not ERROR < %t.out
33

44
// Modified reproducer from https://github.com/llvm/llvm-project/issues/105960
55

@@ -11,7 +11,7 @@ struct inner {
1111
};
1212

1313
void init_inner(inner *iPtr) {
14-
iPtr->i = 0;
14+
iPtr->i = 200;
1515
}
1616

1717
struct outer {
@@ -25,9 +25,9 @@ int main(void) {
2525
init_inner(&l->foo);
2626

2727
int access_offsets_with_different_base = l->foo.i;
28-
printf("%d\n", access_offsets_with_different_base);
28+
printf("Accessed value is %d\n", access_offsets_with_different_base);
2929

3030
return 0;
3131
}
3232

33-
// CHECK-NOT: ERROR: TypeSanitizer: type-aliasing-violation
33+
// CHECK: Accessed value is 200

0 commit comments

Comments
 (0)