aboutsummaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authorlemon <lsof@mailbox.org>2025-09-14 11:06:06 +0200
committerlemon <lsof@mailbox.org>2025-09-14 11:07:11 +0200
commit92c6943fa81145050b083348831a03154be2210c (patch)
treec15a17756c04f87ed1ad00ca510273cc348590af /test
parenta95e385217841da91c3e44674dbaa95fb613a153 (diff)
regalloc.c cleanup
Diffstat (limited to 'test')
-rw-r--r--test/regpressure.c6
-rw-r--r--test/reloc.c4
-rw-r--r--test/test3.c2
3 files changed, 5 insertions, 7 deletions
diff --git a/test/regpressure.c b/test/regpressure.c
index e39853d..6a0708c 100644
--- a/test/regpressure.c
+++ b/test/regpressure.c
@@ -1,8 +1,8 @@
-int foo(int a, int b, int c, int d, int e, int f, int g) {
+int foo(int a, int b, int c, int d, int e, int f, int (*g)(void)) {
void bar(void);
bar();
if (a>0)
- f-=10*(g&f);
+ f-=10*(g()&f);
bar();
- return a + b + c + d + e + f + g;
+ return a + b + c + d + e + f + g();
}
diff --git a/test/reloc.c b/test/reloc.c
index 70cba28..2851cdb 100644
--- a/test/reloc.c
+++ b/test/reloc.c
@@ -2,6 +2,6 @@
float get_value(unsigned x)
{
- static const float values [] = {1.1f, 1.2f, 1.3f, 1.4f};
- return x < 4 ? values[x] : 0.0f;
+ static float values [] = {1.1f, 1.2f, 1.3f, 1.4f};
+ return x < 4 ? values[x] : 0.0f;
}
diff --git a/test/test3.c b/test/test3.c
index b99a543..0f84bba 100644
--- a/test/test3.c
+++ b/test/test3.c
@@ -31,7 +31,6 @@ bscopy(struct bitset dst[/*siz*/], const struct bitset src[/*siz*/], unsigned si
}
-#if 0
long test(long x) {
return x + (long)"abc";
}
@@ -48,4 +47,3 @@ void testss() {
long fma(long x, long y) {
return x + (y <<1) - 2147483648;}
-#endif