Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / compiler-rt / test / msan / pr32842.c
blobb0a05f751d55fe801a8694c09e19185ccc9cccf4
1 // Regression test for https://bugs.llvm.org/show_bug.cgi?id=32842
2 //
3 // RUN: %clang_msan -g %s -o %t
4 // RUN: not %run %t 2>&1 | FileCheck %s
6 struct iphdr {
7 unsigned char pad1: 2, ihl:4, pad2: 2;
8 };
10 int raw_send_hdrinc(unsigned long int length) {
11 struct iphdr iph;
12 if (iph.ihl * 4 > length) {
13 return 1;
15 return 0;
18 int main(int argc, char *argv[]) {
19 return raw_send_hdrinc(12);
22 // CHECK: WARNING: MemorySanitizer: use-of-uninitialized-value