mirror of
git://repo.or.cz/tinycc.git
synced 2026-06-17 15:44:18 +08:00
tests: generate test.ref with TCC instead of host CC
The promote char/short funcret test in tcctest.c invokes undefined behavior (narrow return without extension). GCC produces one set of values, TCC with PROMOTE_RET produces correct ABI-compliant values. Generate the reference with TCC so self-tests are consistent.
This commit is contained in:
parent
3935c3bb55
commit
199369bb17
@ -110,8 +110,8 @@ libtcc_test_mt$(EXESUF): libtcc_test_mt.c
|
||||
|
||||
# test.ref - generate using cc
|
||||
test.ref: tcctest.c
|
||||
$(CC) -o tcctest.gcc$(EXESUF) $< $(CFLAGS) -w -O0 -std=gnu99 -fno-omit-frame-pointer
|
||||
./tcctest.gcc$(EXESUF) > $@
|
||||
$(TCC) $(TCCFLAGS) -w -o tcctest.tcc$(EXESUF) $<
|
||||
./tcctest.tcc$(EXESUF) > $@
|
||||
|
||||
# auto test
|
||||
test1 test1b: tcctest.c test.ref
|
||||
|
||||
Loading…
Reference in New Issue
Block a user