From 6cb4382b0128942f4ba57ab26021be1e5715f2bc Mon Sep 17 00:00:00 2001 From: lemon Date: Sun, 14 Sep 2025 19:23:21 +0200 Subject: codegen: float cmp, ior; frontend: fix cond expr bug --- test/regpressure.c | 7 ++++--- test/test4.c | 19 +++++++++++++++++++ 2 files changed, 23 insertions(+), 3 deletions(-) create mode 100644 test/test4.c (limited to 'test') diff --git a/test/regpressure.c b/test/regpressure.c index 6a0708c..1d65294 100644 --- a/test/regpressure.c +++ b/test/regpressure.c @@ -1,8 +1,9 @@ int foo(int a, int b, int c, int d, int e, int f, int (*g)(void)) { - void bar(void); - bar(); + int aa[4]; + void bar(int *); + bar(aa); if (a>0) f-=10*(g()&f); - bar(); + bar(aa); return a + b + c + d + e + f + g(); } diff --git a/test/test4.c b/test/test4.c new file mode 100644 index 0000000..4a127d0 --- /dev/null +++ b/test/test4.c @@ -0,0 +1,19 @@ +int xor(int a) { + return a ^ 3 | 233333; +} + +int cmp(float x, float y) { + return x < y && x > 0.f; +} + +int main() { + int x = 42, + *a = &x, + **b = &a, + ***c = &b, + ****d = &c, + *****e = &d, + ******f = &e; + return ******f; +} + -- cgit v1.2.3