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
110110
111111 # test.ref - generate using cc
112112 test.ref: tcctest.c
113− $(CC) -o tcctest.gcc$(EXESUF) $< $(CFLAGS) -w -O0 -std=gnu99 -fno-omit-frame-pointer
114− ./tcctest.gcc$(EXESUF) > $@
113+ $(TCC) $(TCCFLAGS) -w -o tcctest.tcc$(EXESUF) $<
114+ ./tcctest.tcc$(EXESUF) > $@
115115
116116 # auto test
117117 test1 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