aboutsummaryrefslogtreecommitdiffstats
path: root/test/monniaux
diff options
context:
space:
mode:
Diffstat (limited to 'test/monniaux')
-rw-r--r--test/monniaux/ncompress/Makefile24
-rw-r--r--test/monniaux/ncompress/compress42.c5
-rw-r--r--test/monniaux/picosat-965/picosat.c3
-rw-r--r--test/monniaux/regalloc/invalid_register_allocation2.c7
-rw-r--r--test/monniaux/rules.mk6
-rw-r--r--test/monniaux/sha-2/Makefile21
-rw-r--r--test/monniaux/xor_and_mat/Makefile21
7 files changed, 21 insertions, 66 deletions
diff --git a/test/monniaux/ncompress/Makefile b/test/monniaux/ncompress/Makefile
index 960d04d0..cf543976 100644
--- a/test/monniaux/ncompress/Makefile
+++ b/test/monniaux/ncompress/Makefile
@@ -1,29 +1,7 @@
-CFLAGS=-Wall -O3
-CCOMPFLAGS=-Wall -O3 -D_DEFAULT_SOURCE
-CCOMP=ccomp
-EXECUTE=k1-cluster --syscall=libstd_scalls.so --
-
-K1C_CC=k1-mbr-gcc
-K1C_CFLAGS=-Wall -O3 -std=c99
-K1C_CCOMP=../../../ccomp
-K1C_CCOMPFLAGS=-Wall -O3
+include ../rules.mk
all: check
-%.gcc.k1c.s: %.c
- $(K1C_CC) $(K1C_CFLAGS) -S $< -o $@
-
-%.gcc.k1c.o: %.gcc.k1c.s
- $(K1C_CC) $(K1C_CFLAGS) -c $< -o $@
-
-%.ccomp.k1c.s: %.c
- $(K1C_CCOMP) $(K1C_CCOMPFLAGS) -S $< -o $@
-
-%.ccomp.k1c.o: %.ccomp.k1c.s
- $(K1C_CCOMP) $(K1C_CCOMPFLAGS) -c $< -o $@
-
-%.gcc.host.o: %.c
- $(CC) $(CFLAGS) -c $< -o $@
all: compress.gcc.host compress.ccomp.host compress.gcc.k1c compress.ccomp.k1c
diff --git a/test/monniaux/ncompress/compress42.c b/test/monniaux/ncompress/compress42.c
index 681dbbff..36bf0132 100644
--- a/test/monniaux/ncompress/compress42.c
+++ b/test/monniaux/ncompress/compress42.c
@@ -135,6 +135,11 @@
#define INT_MOD(x, y) ((long) (x) % (y))
#include "../clock.h"
+/* DMonniaux for utime and strdup */
+#define UTIME_H
+#define _BSD_SOURCE 1
+#undef __STRICT_ANSI__
+
#ifdef _MSC_VER
# define WINDOWS
#endif
diff --git a/test/monniaux/picosat-965/picosat.c b/test/monniaux/picosat-965/picosat.c
index 2d3c96b7..31b299c0 100644
--- a/test/monniaux/picosat-965/picosat.c
+++ b/test/monniaux/picosat-965/picosat.c
@@ -3366,6 +3366,7 @@ report (PS * ps, int replevel, char type)
{
if (ps->reports >= 0)
fprintf (ps->out, "%s%c ", ps->prefix, type);
+#ifdef DMONNIAUX_DISABLE
relem (ps, "seconds", 1, ps->seconds);
relem (ps, "level", 1, avglevel (ps));
@@ -3390,6 +3391,7 @@ report (PS * ps, int replevel, char type)
// relem (ps, "llused", 0, ps->llused);
relem (ps, 0, 0, 0);
+#endif
ps->reports++;
}
@@ -5455,7 +5457,6 @@ simplify (PS * ps, int forced)
ps->lsimplify = ps->propagations + delta;
ps->fsimplify = ps->fixed;
ps->simps++;
-
report (ps, 1, 's');
}
diff --git a/test/monniaux/regalloc/invalid_register_allocation2.c b/test/monniaux/regalloc/invalid_register_allocation2.c
new file mode 100644
index 00000000..88a8e184
--- /dev/null
+++ b/test/monniaux/regalloc/invalid_register_allocation2.c
@@ -0,0 +1,7 @@
+extern void toto(int, double);
+
+void
+report (int x)
+{
+ toto (1, x/ 10.0);
+}
diff --git a/test/monniaux/rules.mk b/test/monniaux/rules.mk
index 11256bd3..19a11c5f 100644
--- a/test/monniaux/rules.mk
+++ b/test/monniaux/rules.mk
@@ -1,10 +1,12 @@
CCOMP=ccomp
-CCOMPFLAGS=-O3 -Wall
+CCOMPFLAGS=-O3 -Wall -fno-unprototyped
CFLAGS= -std=c99 -O3 -Wall -Wextra -Werror=implicit
K1C_CC=k1-mbr-gcc
K1C_CFLAGS = -std=c99 -O3 -Wall -Wextra -Werror=implicit
K1C_CCOMP = ../../../ccomp
-K1C_CCOMPFLAGS=-O3 -Wall
+K1C_CCOMPFLAGS=-O3 -Wall -fno-unprototyped
+
+EXECUTE=k1-cluster --syscall=libstd_scalls.so --
%.host.gcc.o : %.c
$(CC) $(CFLAGS) -c -o $@ $<
diff --git a/test/monniaux/sha-2/Makefile b/test/monniaux/sha-2/Makefile
index eb878cd3..f3918f7f 100644
--- a/test/monniaux/sha-2/Makefile
+++ b/test/monniaux/sha-2/Makefile
@@ -1,25 +1,9 @@
-CFLAGS=-Wall -O3
-K1C_CC=k1-mbr-gcc
-K1C_CFLAGS=-Wall -O3 -std=c99
-K1C_CCOMP=../../../ccomp
-K1C_CCOMPFLAGS=-Wall -O3
+include ../rules.mk
PRODUCTS=sha-256.host sha-256.gcc.k1c.out sha-256.ccomp.k1c.out sha-256.ccomp.k1c.s sha-256.gcc.k1c.s sha-256.gcc.k1c sha-256.ccomp.k1c
all: $(PRODUCTS)
-%.gcc.k1c.s: %.c
- $(K1C_CC) $(K1C_CFLAGS) -S $< -o $@
-
-%.gcc.k1c.o: %.gcc.k1c.s
- $(K1C_CC) $(K1C_CFLAGS) -c $< -o $@
-
-%.ccomp.k1c.s: %.c
- $(K1C_CCOMP) $(K1C_CCOMPFLAGS) -S $< -o $@
-
-%.ccomp.k1c.o: %.ccomp.k1c.s
- $(K1C_CCOMP) $(K1C_CCOMPFLAGS) -c $< -o $@
-
sha-256.host: sha-256.c sha-256_run.c sha-256.h
$(CC) $(CFLAGS) sha-256.c sha-256_run.c -o $@
@@ -31,9 +15,6 @@ sha-256.gcc.k1c: sha-256.gcc.k1c.o sha-256_run.gcc.k1c.o
sha-256.ccomp.k1c: sha-256.ccomp.k1c.o sha-256_run.gcc.k1c.o
$(K1C_CCOMP) $(K1C_CCOMPFLAGS) $+ -o $@
-%.k1c.out: %.k1c
- k1-cluster --cycle-based -- $< | tee $@
-
clean:
$(RM) -f $(PRODUCTS) sha-256.gcc.k1c.o sha-256.ccomp.k1c.o sha-256_run.gcc.k1c.o sha-256_run.gcc.k1c.s
diff --git a/test/monniaux/xor_and_mat/Makefile b/test/monniaux/xor_and_mat/Makefile
index 627e2163..005382de 100644
--- a/test/monniaux/xor_and_mat/Makefile
+++ b/test/monniaux/xor_and_mat/Makefile
@@ -1,25 +1,9 @@
-CFLAGS=-Wall -O3
-K1C_CC=k1-mbr-gcc
-K1C_CFLAGS=-Wall -O3 -std=c99
-K1C_CCOMP=../../../ccomp
-K1C_CCOMPFLAGS=-Wall -O3
+include ../rules.mk
PRODUCTS=int_mat.host int_mat.gcc.k1c.out int_mat.ccomp.k1c.out int_mat.ccomp.k1c.s int_mat.gcc.k1c.s int_mat.gcc.k1c int_mat.ccomp.k1c
all: $(PRODUCTS)
-%.gcc.k1c.s: %.c
- $(K1C_CC) $(K1C_CFLAGS) -S $< -o $@
-
-%.gcc.k1c.o: %.gcc.k1c.s
- $(K1C_CC) $(K1C_CFLAGS) -c $< -o $@
-
-%.ccomp.k1c.s: %.c
- $(K1C_CCOMP) $(K1C_CCOMPFLAGS) -S $< -o $@
-
-%.ccomp.k1c.o: %.ccomp.k1c.s
- $(K1C_CCOMP) $(K1C_CCOMPFLAGS) -c $< -o $@
-
int_mat.host: int_mat.c int_mat_run.c xor_and.h
$(CC) $(CFLAGS) int_mat.c int_mat_run.c -o $@
@@ -31,9 +15,6 @@ int_mat.gcc.k1c: int_mat.gcc.k1c.o int_mat_run.gcc.k1c.o
int_mat.ccomp.k1c: int_mat.ccomp.k1c.o int_mat_run.gcc.k1c.o
$(K1C_CCOMP) $(K1C_CCOMPFLAGS) $+ -o $@
-%.k1c.out: %.k1c
- k1-cluster --cycle-based -- $< | tee $@
-
clean:
$(RM) -f $(PRODUCTS) int_mat.gcc.k1c.o int_mat.ccomp.k1c.o int_mat_run.gcc.k1c.o