History

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.

Meng Zhuo committed 6 months ago

Commit 199369b1 parent 3935c3b1 file · +2 −2Browse files

Unified · Split

tests/Makefile+2−2
@@ -110,8 +110,8 @@ libtcc_test_mt$(EXESUF): libtcc_test_mt.c · 109 unmodified lines
110 110
111# test.ref - generate using cc111# test.ref - generate using cc
112test.ref: tcctest.c112test.ref: tcctest.c
113 $(CC) -o tcctest.gcc$(EXESUF) $< $(CFLAGS) -w -O0 -std=gnu99 -fno-omit-frame-pointer113 $(TCC) $(TCCFLAGS) -w -o tcctest.tcc$(EXESUF) $<
114 ./tcctest.gcc$(EXESUF) > $@114 ./tcctest.tcc$(EXESUF) > $@
115 115
116# auto test116# auto test
117test1 test1b: tcctest.c test.ref117test1 test1b: tcctest.c test.ref

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t