diff options
| author | Kirill Smelkov <kirr@navytux.spb.ru> | 2012-12-09 19:51:20 +0400 |
|---|---|---|
| committer | Kirill Smelkov <kirr@navytux.spb.ru> | 2012-12-09 19:51:20 +0400 |
| commit | a55ecf6d2cecae75dd456ec288d36a31344db1cf (patch) | |
| tree | 59214457d2e592b9b1a995fcb54fd91e577cdc07 /tests/Makefile | |
| parent | c4a18f47a24ccc1345944120faf52a983be8fa33 (diff) | |
| parent | 031ff872be7be76c2c088981a827cbb2a29dfc13 (diff) | |
| download | tinycc-a55ecf6d2cecae75dd456ec288d36a31344db1cf.tar.gz tinycc-a55ecf6d2cecae75dd456ec288d36a31344db1cf.tar.bz2 | |
Repair bounds-checking more, this time `tcc -b -run tcc.c -run tcc.c -run tcctest.c` works
Hello up there. On the list Grischka made a point that we can't recommend using
-b as long as tcc -b tcc.c doesn't produce anything useful. Now it does, so
please don't treat -b mode as second class citizen anymore.
Thanks,
Kirill
* bcheck2:
tests: Add tests for compile/run tcc.c with `tcc -b` then compile tcc.c again, then run tcctest.c
lib/bcheck: Fix code typo in __bound_delete_region()
lib/bcheck: Don't assume heap goes right after bss
Make tcc work after self-compiling with bounds-check enabled
Diffstat (limited to 'tests/Makefile')
| -rw-r--r-- | tests/Makefile | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/tests/Makefile b/tests/Makefile index da7c3f9..116178f 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -12,6 +12,9 @@ TESTS = libtest \ test3 \ speedtest \ btest \ + test1b\ + test2b\ + test3b\ weaktest # test4 # this test does not seem to work on any platform @@ -20,6 +23,9 @@ TESTS = libtest \ # bounds-checking is supported only on i386 ifneq ($(ARCH),i386) TESTS := $(filter-out btest,$(TESTS)) + TESTS := $(filter-out test1b,$(TESTS)) + TESTS := $(filter-out test2b,$(TESTS)) + TESTS := $(filter-out test3b,$(TESTS)) endif # these should work too @@ -87,18 +93,33 @@ test1: test.ref $(TCC) -run tcctest.c > test.out1 @if diff -u test.ref test.out1 ; then echo "Auto Test OK"; fi +test1b: test.ref + @echo ------------ $@ ------------ + $(TCC) -b -run tcctest.c > test.out1b + @if diff -u test.ref test.out1b ; then echo "Auto Test OK"; fi + # iterated test2 (compile tcc then compile tcctest.c !) test2: test.ref @echo ------------ $@ ------------ $(TCC) $(RUN_TCC) $(RUN_TCC) -run tcctest.c > test.out2 @if diff -u test.ref test.out2 ; then echo "Auto Test2 OK"; fi +test2b: test.ref ../bcheck.o + @echo ------------ $@ ------------ + $(TCC) -b $(RUN_TCC) $(RUN_TCC) -run tcctest.c > test.out2b + @if diff -u test.ref test.out2b ; then echo "Auto Test2b OK"; fi + # iterated test3 (compile tcc then compile tcc then compile tcctest.c !) test3: test.ref @echo ------------ $@ ------------ $(TCC) $(RUN_TCC) $(RUN_TCC) $(RUN_TCC) -run tcctest.c > test.out3 @if diff -u test.ref test.out3 ; then echo "Auto Test3 OK"; fi +test3b: test.ref + @echo ------------ $@ ------------ + $(TCC) -b $(RUN_TCC) $(RUN_TCC) $(RUN_TCC) -run tcctest.c > test.out3b + @if diff -u test.ref test.out3b ; then echo "Auto Test3 OK"; fi + # binary output test test4: test.ref @echo ------------ $@ ------------ @@ -190,5 +211,5 @@ cache: tcc_g # clean clean: - rm -vf *~ *.o *.a *.bin *.i *.ref *.out *.out? *.gcc \ + rm -vf *~ *.o *.a *.bin *.i *.ref *.out *.out? *.out?b *.gcc \ tcctest[1234] ex? libtcc_test$(EXESUF) tcc_g tcclib.h |
