Commit 48678e80 authored by Marek Chalupa's avatar Marek Chalupa
Browse files

tests: add a new test

parent 2be037ae
Loading
Loading
Loading
Loading

tests/c/mp_aa-ceq50.c

0 → 100644
+26 −0
Original line number Diff line number Diff line
#include <assert.h>

// UNSUPPORTED: bse
// UNSUPPORTED: kind
// RUN: clang %s -emit-llvm -g -c -o %t.bc
// RUN: rm -rf %t-out
// RUN: timeout 100 sb -out-dir=%t-out %opts %t.bc &>%t.log
// RUN: cat %t.log | FileCheck %s

int main() {
    int i = 0;
    int x = 1;
    while (i < 100) {
        if (i >= 50) {
            i += 2;
        } else {
            ++i;
            ++x;
        }
        if (i == 1)
            --x;
    }
    assert(x == 50);
	// CHECK-NOT: assertion failed!
	// CHECK: Found errors: 0
}