diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/raytracer/Makefile | 2 | ||||
-rw-r--r-- | test/regression/Makefile | 2 | ||||
-rw-r--r-- | test/regression/Results/bool | 9 | ||||
-rw-r--r-- | test/regression/bool.c | 29 | ||||
-rw-r--r-- | test/spass/Makefile | 2 |
5 files changed, 41 insertions, 3 deletions
diff --git a/test/raytracer/Makefile b/test/raytracer/Makefile index db359b1..a4b8894 100644 --- a/test/raytracer/Makefile +++ b/test/raytracer/Makefile @@ -1,7 +1,7 @@ include ../../Makefile.config CC=../../ccomp -CFLAGS=-stdlib ../../runtime -dparse -dclight -dasm -fstruct-passing -fstruct-assign +CFLAGS=-stdlib ../../runtime -dparse -dclight -dasm -fstruct-return LIBS=$(LIBMATH) TIME=xtime -mintime 2.0 diff --git a/test/regression/Makefile b/test/regression/Makefile index f3dcf4d..e9d0318 100644 --- a/test/regression/Makefile +++ b/test/regression/Makefile @@ -12,7 +12,7 @@ TESTS=attribs1 bitfields1 bitfields2 bitfields3 bitfields4 \ expr1 expr6 initializers volatile1 volatile2 volatile3 \ funct3 expr5 struct7 struct8 struct11 casts1 casts2 char1 \ sizeof1 sizeof2 packedstruct1 packedstruct2 \ - instrsel + instrsel bool # Other tests: should compile to .s without errors (but expect warnings) EXTRAS=annot1 commaprec expr2 expr3 expr4 extern1 funct2 funptr1 init1 \ diff --git a/test/regression/Results/bool b/test/regression/Results/bool new file mode 100644 index 0000000..923c6e2 --- /dev/null +++ b/test/regression/Results/bool @@ -0,0 +1,9 @@ +a = 1 +b = 0 +c = 1 +d = 0 +e = 1 +f = 0 +g = 1 +h = 1 +i = 0 diff --git a/test/regression/bool.c b/test/regression/bool.c new file mode 100644 index 0000000..d2b3857 --- /dev/null +++ b/test/regression/bool.c @@ -0,0 +1,29 @@ +/* Testing _Bool type support */ + +#include <stdio.h> + +int x = 42; + +int main() +{ + _Bool a, b, c, d, e, f, g, h, i; + a = x; + b = x >= 100; + c = &x; + d = a && b; + e = a || b; + f = a & b; + g = a | b; + h = 3.14; + i = 0.0; + printf("a = %d\n", a); + printf("b = %d\n", b); + printf("c = %d\n", c); + printf("d = %d\n", d); + printf("e = %d\n", e); + printf("f = %d\n", f); + printf("g = %d\n", g); + printf("h = %d\n", h); + printf("i = %d\n", i); + return 0; +} diff --git a/test/spass/Makefile b/test/spass/Makefile index 536488b..6797475 100644 --- a/test/spass/Makefile +++ b/test/spass/Makefile @@ -1,7 +1,7 @@ include ../../Makefile.config CC=../../ccomp -CFLAGS=-stdlib ../../runtime -dparse -dclight -dasm -fstruct-passing -fstruct-assign +CFLAGS=-stdlib ../../runtime -dparse -dclight -dasm -fstruct-return SRCS=analyze.c clause.c clock.c closure.c cnf.c component.c \ condensing.c context.c defs.c dfgparser.c dfgscanner.c doc-proof.c \ |