From: Matthias Braun Date: Wed, 19 Sep 2007 13:19:53 +0000 (+0000) Subject: testcase for no yet comitted flags code X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;h=7d2707b656d86f28d4c3a5bf6662d25174f38c6f;p=libfirm testcase for no yet comitted flags code [r15880] --- diff --git a/ir/be/test/fehler79.c b/ir/be/test/fehler79.c new file mode 100644 index 000000000..b3ab817e8 --- /dev/null +++ b/ir/be/test/fehler79.c @@ -0,0 +1,27 @@ +/*$ -fno-inline -fno-cond-eval $*/ + +int x; + +int destroy_flags(void) { + rand(); + return 0; +} + +int f(void) { + int a = (x < 5); + int t = 1; + destroy_flags(); + if(a) { + t = 42; + } + return t; +} + +int main(void) { + x = 2; + printf("Res: %d (expected 42)\n", f()); + x = 10; + printf("Res: %d (expected 1)\n", f()); + + return 0; +}