summaryrefslogtreecommitdiff
path: root/test/c
diff options
context:
space:
mode:
authorGravatar xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e>2010-02-17 13:44:32 +0000
committerGravatar xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e>2010-02-17 13:44:32 +0000
commit6224148fdd809170d138216d72b8e6180d626aec (patch)
treef67127b4ab6026f5e29d0b6aa69bec4f8a223fb2 /test/c
parentf9ebf19ba3ca4c3ee67cc88bbea407d4dd734249 (diff)
Reorganization test directory
git-svn-id: https://yquem.inria.fr/compcert/svn/compcert/trunk@1253 fca1b0fc-160b-0410-b1d3-a4f43f01ea2e
Diffstat (limited to 'test/c')
-rw-r--r--test/c/Makefile6
-rw-r--r--test/c/Results/initializersbin306 -> 0 bytes
-rw-r--r--test/c/initializers.c68
3 files changed, 2 insertions, 72 deletions
diff --git a/test/c/Makefile b/test/c/Makefile
index 060c8fc..1284d98 100644
--- a/test/c/Makefile
+++ b/test/c/Makefile
@@ -10,13 +10,11 @@ LIBS=$(LIBMATH)
TIME=xtime -o /dev/null -mintime 1.0 # Xavier's hack
#TIME=time >/dev/null # Otherwise
-BENCHS=fib integr qsort fft sha1 aes almabench lists \
+PROGS=fib integr qsort fft sha1 aes almabench lists \
binarytrees fannkuch knucleotide mandelbrot nbody \
nsieve nsievebits spectral vmach \
bisect chomp perlin
-PROGS=$(BENCHS) initializers
-
all_s: $(PROGS:%=%.s)
all: $(PROGS:%=%.compcert)
@@ -26,7 +24,7 @@ all_gcc: $(PROGS:%=%.gcc)
%.compcert: %.c $(CCOMP)
$(CCOMP) $(CCOMPFLAGS) -o $*.compcert $*.c $(LIBS)
-%.s: %.c ../../ccomp
+%.s: %.c $(CCOMP)
$(CCOMP) $(CCOMPFLAGS) -S $*.c
%.gcc: %.c
diff --git a/test/c/Results/initializers b/test/c/Results/initializers
deleted file mode 100644
index 979eff3..0000000
--- a/test/c/Results/initializers
+++ /dev/null
Binary files differ
diff --git a/test/c/initializers.c b/test/c/initializers.c
deleted file mode 100644
index 97ce99b..0000000
--- a/test/c/initializers.c
+++ /dev/null
@@ -1,68 +0,0 @@
-#include <stdio.h>
-
-char x1 = 'x';
-
-int x2 = 12345;
-
-double x3 = 3.14159;
-
-char x4[4] = { 'a', 'b', 'c', 'd' };
-
-int x5[10] = { 1, 2, 3 };
-
-struct { int y; int z; } x6 = { 4, 5 };
-
-struct { int y; char z; } x7 = { 6, 'u' };
-
-struct { char y; int z; } x8 = { 'v', 7 };
-
-struct { char y[9]; double z; } x9 = { { 'a', 'b' }, 2.718 };
-
-struct {
- struct { char y; int z; } u;
- double v;
-} x10 = { { 'v', 7 }, 2.718 };
-
-float x11 = 1 + 1 / 3.14159;
-
-double x12 = 1 / 3.14159 + 1;
-
-typedef enum { AAA , BBB } MyEnum;
-
-const MyEnum x13[2] = { AAA, BBB };
-
-int * x14 = &x2;
-
-struct { char * y; int * z; float * u; double * v; } x15 = { x4, x5, &x11, &x12 };
-
-int main(int argc, char ** argv)
-{
- int i;
-
- printf("x1 = '%c'\n", x1);
- printf("x2 = %d\n", x2);
- printf("x3 = %.5f\n", x3);
- printf("x4 = { '%c', '%c', '%c', '%c' }\n",
- x4[0], x4[1], x4[2], x4[3]);
- printf("x5 = { ");
- for (i = 0; i < 10; i++) printf("%d, ", x5[i]);
- printf("}\n");
- printf("x6 = { %d, %d }\n", x6.y, x6.z);
- printf("x7 = { %d, '%c' }\n", x7.y, x7.z);
- printf("x8 = { '%c', %d }\n", x8.y, x8.z);
- printf("x9 = { { ");
- for (i = 0; i < 9; i++) printf("'%c', ", x9.y[i]);
- printf("}, %.3f }\n", x9.z);
- printf("x10 = { { '%c', %d }, %.3f }\n",
- x10.u.y, x10.u.z, x10.v);
- printf("x11 = %.10f\n", x11);
- printf("x12 = %.10f\n", x12);
- printf("x13 = { %d, %d }\n", x13[0], x13[1]);
- if (x14 == &x2) printf("x14 ok\n"); else printf("x14 error\n");
- if (x15.y == x4 && x15.z == x5 && x15.u == &x11 && x15.v == &x12)
- printf("x15 ok\n");
- else
- printf("x15 error\n");
- return 0;
-}
-