diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/Makefile | 4 | ||||
| -rw-r--r-- | tests/pp/13.expect | 1 | ||||
| -rw-r--r-- | tests/pp/15.c | 4 | ||||
| -rw-r--r-- | tests/pp/15.expect | 2 | ||||
| -rw-r--r-- | tests/pp/Makefile | 4 | ||||
| -rw-r--r-- | tests/tcctest.c | 7 | ||||
| -rw-r--r-- | tests/tests2/95_bitfields.c | 2 | ||||
| -rw-r--r-- | tests/tests2/96_nodata_wanted.c | 2 | ||||
| -rw-r--r-- | tests/tests2/96_nodata_wanted.expect | 2 | ||||
| -rw-r--r-- | tests/tests2/Makefile | 2 |
10 files changed, 14 insertions, 16 deletions
diff --git a/tests/Makefile b/tests/Makefile index 39dee7f..6a61717 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -234,8 +234,12 @@ vla_test-run: vla_test$(EXESUF) cross-test : @echo ------------ $@ ------------ $(TOP)/i386-tcc$(EXESUF) $(TCCFLAGS-unx) -c $(TOPSRC)/examples/ex3.c && echo "ok" + $(TOP)/i386-win32-tcc$(EXESUF) $(TCCFLAGS-win) $(TOPSRC)/examples/ex3.c && echo "ok" $(TOP)/x86_64-tcc$(EXESUF) $(TCCFLAGS-unx) -c $(TOPSRC)/examples/ex3.c && echo "ok" + $(TOP)/x86_64-win32-tcc$(EXESUF) $(TCCFLAGS-win) $(TOPSRC)/examples/ex3.c && echo "ok" $(TOP)/arm-tcc$(EXESUF) $(TCCFLAGS-unx) -c $(TOPSRC)/examples/ex3.c && echo "ok" + $(TOP)/arm-wince-tcc$(EXESUF) $(TCCFLAGS-win) -c $(TOPSRC)/examples/ex3.c && echo "ok" + $(TOP)/arm64-tcc$(EXESUF) $(TCCFLAGS-unx) -c $(TOPSRC)/examples/ex3.c && echo "ok" $(TOP)/c67-tcc$(EXESUF) $(TCCFLAGS-unx) -c $(TOPSRC)/examples/ex3.c && echo "ok" $(TOP)/i386-win32-tcc$(EXESUF) $(TCCFLAGS-win) $(TOPSRC)/win32/examples/hello_win.c && echo "ok" $(TOP)/x86_64-win32-tcc$(EXESUF) $(TCCFLAGS-win) $(TOPSRC)/win32/examples/hello_win.c && echo "ok" diff --git a/tests/pp/13.expect b/tests/pp/13.expect index 6eb2bec..c7a3230 100644 --- a/tests/pp/13.expect +++ b/tests/pp/13.expect @@ -1,3 +1,2 @@ -# `modelist' label. Each video mode record looks like: .text endtext: diff --git a/tests/pp/15.c b/tests/pp/15.c index 3bbc3ca..cf13f9a 100644 --- a/tests/pp/15.c +++ b/tests/pp/15.c @@ -12,7 +12,7 @@ return n(A)n(++)n(+)n(+)n(B); return n(0x1E)n(-1); // unlike gcc but correct -XXX: return n(x)+n(x)-n(1)+n(1)-2; +// XXX: return n(x)+n(x)-n(1)+n(1)-2; // unlike gcc, but cannot appear in valid C -XXX: return n(x)n(x)n(1)n(2)n(x); +// XXX: return n(x)n(x)n(1)n(2)n(x); diff --git a/tests/pp/15.expect b/tests/pp/15.expect index f652240..b4f885e 100644 --- a/tests/pp/15.expect +++ b/tests/pp/15.expect @@ -3,5 +3,3 @@ return A+++B; return A+ ++B; return A+++ +B; return 0x1E -1; -XXX: return x+x-1 +1 -2; -XXX: return x x 1 2 x; diff --git a/tests/pp/Makefile b/tests/pp/Makefile index 21c9969..687aa52 100644 --- a/tests/pp/Makefile +++ b/tests/pp/Makefile @@ -12,7 +12,7 @@ TESTS = $(call files,c) $(call files,S) all test : $(sort $(TESTS)) -DIFF_OPTS = -Nu -b -B -I "^\#" +DIFF_OPTS = -Nu -b -B # Filter source directory in warnings/errors (out-of-tree builds) FILTER = 2>&1 | sed 's,$(SRC)/,,g' @@ -40,7 +40,7 @@ clean: rm -f *.output 02.test : DIFF_OPTS += -w -15.test : DIFF_OPTS += -I"^XXX:" +# 15.test : DIFF_OPTS += -I"^XXX:" # diff options: # -b ighore space changes diff --git a/tests/tcctest.c b/tests/tcctest.c index 7877243..099fc35 100644 --- a/tests/tcctest.c +++ b/tests/tcctest.c @@ -3235,6 +3235,7 @@ void asm_local_statics (void) } #endif +static unsigned int set; void fancy_copy (unsigned *in, unsigned *out) @@ -3247,7 +3248,7 @@ void fancy_copy2 (unsigned *in, unsigned *out) asm volatile ("mov %0,(%1)" : : "r" (*in), "r" (out) : "memory"); } -#ifdef __x86_64__ +#if defined __x86_64__ && !defined _WIN64 void clobber_r12(void) { asm volatile("mov $1, %%r12" ::: "r12"); @@ -3256,7 +3257,7 @@ void clobber_r12(void) void test_high_clobbers(void) { -#ifdef __x86_64__ +#if defined __x86_64__ && !defined _WIN64 register long val asm("r12"); long val2; /* This tests if asm clobbers correctly save/restore callee saved @@ -3265,11 +3266,9 @@ void test_high_clobbers(void) correctly capture the data flow, but good enough for us. */ asm volatile("mov $0x4542, %%r12" : "=r" (val):: "memory"); clobber_r12(); -#ifndef _WIN64 asm volatile("mov %%r12, %0" : "=r" (val2) : "r" (val): "memory"); printf("asmhc: 0x%x\n", val2); #endif -#endif } static long cpu_number; diff --git a/tests/tests2/95_bitfields.c b/tests/tests2/95_bitfields.c index 683becf..f025c57 100644 --- a/tests/tests2/95_bitfields.c +++ b/tests/tests2/95_bitfields.c @@ -70,7 +70,7 @@ { struct M P __s { int a; - char b; + signed char b; int x : 12, y : 4, : 0, : 4, z : 3; char d; }; diff --git a/tests/tests2/96_nodata_wanted.c b/tests/tests2/96_nodata_wanted.c index b594938..cc211d3 100644 --- a/tests/tests2/96_nodata_wanted.c +++ b/tests/tests2/96_nodata_wanted.c @@ -78,7 +78,7 @@ te1:; tl += &&te1 - &&ts1; printf("size of data/text:\n %s/%s\n", dl ? "non-zero":"zero", tl ? "non-zero":"zero"); - printf("# %d/%d\n", dl, tl); + /*printf("# %d/%d\n", dl, tl);*/ } #endif diff --git a/tests/tests2/96_nodata_wanted.expect b/tests/tests2/96_nodata_wanted.expect index 6e54f24..2749109 100644 --- a/tests/tests2/96_nodata_wanted.expect +++ b/tests/tests2/96_nodata_wanted.expect @@ -17,9 +17,7 @@ data: 333 44 555555 6 7 size of data/text: non-zero/non-zero -# 111/193 [test_data_suppression_on] size of data/text: zero/zero -# 0/0 diff --git a/tests/tests2/Makefile b/tests/tests2/Makefile index 6bff618..190b2d9 100644 --- a/tests/tests2/Makefile +++ b/tests/tests2/Makefile @@ -70,7 +70,7 @@ all test tests2.all: $(filter-out $(SKIP),$(TESTS)) ; T1 = $(TCC) $(FLAGS) $< -o a.exe && ./a.exe $(ARGS) T2 = $(TCC) $(FLAGS) -run $< $(ARGS) T3 = $(FILTER) >$*.output 2>&1 || true \ - && diff -Nbu -I "^\#" $(filter %.expect,$^) $*.output \ + && diff -Nbu $(filter %.expect,$^) $*.output \ && rm -f $*.output $(filter $*.expect,$(GEN-ALWAYS)) # run single test and update .expect file, e.g. "make tests2.37+" |
