Hi,

I stumbled over this tcc -run bug, when cross-checking against my own
compiler rcc.
gcc and clang also behave like the 2nd part.

tcc runs it with -dt, which essentially does it as below.

$ ./tcc -Dtest_128_return -run tests/tests2/128_run_atexit.c
startup5
cleanup5
1 cleanup4
1 cleanup3
cleanup2
cleanup1

$ ./tcc -Dtest_128_return tests/tests2/128_run_atexit.c && ./a.out
startup5
1 cleanup4
1 cleanup3
cleanup2
cleanup1
cleanup5

I haven't checked in tccrun what's causing the wrong ordering of void
__attribute((destructor)) cleanup5.
The tests/tests2/128_run_atexit.expect file is also wrong.
-- 
Reini Urban
_______________________________________________
Tinycc-devel mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/tinycc-devel

Reply via email to