diff options
| author | 2025-09-14 19:23:21 +0200 | |
|---|---|---|
| committer | 2025-09-14 19:23:21 +0200 | |
| commit | 6cb4382b0128942f4ba57ab26021be1e5715f2bc (patch) | |
| tree | 0b63731286acbe503981958930aeae93816b6b34 /test | |
| parent | 7a318363ec4fdcd80d9d0154cef393c9bf205d5e (diff) | |
codegen: float cmp, ior; frontend: fix cond expr bug
Diffstat (limited to 'test')
| -rw-r--r-- | test/regpressure.c | 7 | ||||
| -rw-r--r-- | test/test4.c | 19 |
2 files changed, 23 insertions, 3 deletions
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; +} + |