diff options
Diffstat (limited to 'test/msan/icmp_slt_allones.cc')
-rw-r--r-- | test/msan/icmp_slt_allones.cc | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/test/msan/icmp_slt_allones.cc b/test/msan/icmp_slt_allones.cc new file mode 100644 index 000000000000..8eff2eac8ad9 --- /dev/null +++ b/test/msan/icmp_slt_allones.cc @@ -0,0 +1,20 @@ +// PR24561 +// RUN: %clangxx_msan -O2 -g %s -o %t && %run %t + +#include <stdio.h> + +struct A { + int c1 : 7; + int c8 : 1; + int c9 : 1; + A(); +}; + +__attribute__((noinline)) A::A() : c8(1) {} + +int main() { + A* a = new A(); + if (a->c8 == 0) + printf("zz\n"); + return 0; +} |