mirror of
https://github.com/TinyCC/tinycc.git
synced 2026-05-15 13:25:44 +00: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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user