tccgen: Allow struct init from struct
[tinycc.git] / tests / gcctestsuite.sh
blob2be274ca3aa3250a57f8137283264abaff0fc7d8
1 #!/bin/sh
3 TESTSUITE_PATH=$HOME/gcc/gcc-3.2/gcc/testsuite/gcc.c-torture
4 TCC="./tcc -B. -I. -DNO_TRAMPOLINES"
5 rm -f tcc.sum tcc.fail
6 nb_ok="0"
7 nb_failed="0"
8 nb_exe_failed="0"
10 for src in $TESTSUITE_PATH/compile/*.c ; do
11 echo $TCC -o /tmp/tst.o -c $src
12 $TCC -o /tmp/tst.o -c $src >> tcc.fail 2>&1
13 if [ "$?" = "0" ] ; then
14 result="PASS"
15 nb_ok=$(( $nb_ok + 1 ))
16 else
17 result="FAIL"
18 nb_failed=$(( $nb_failed + 1 ))
20 echo "$result: $src" >> tcc.sum
21 done
23 for src in $TESTSUITE_PATH/execute/*.c ; do
24 echo $TCC $src -o /tmp/tst -lm
25 $TCC $src -o /tmp/tst -lm >> tcc.fail 2>&1
26 if [ "$?" = "0" ] ; then
27 result="PASS"
28 if /tmp/tst >> tcc.fail 2>&1
29 then
30 result="PASS"
31 nb_ok=$(( $nb_ok + 1 ))
32 else
33 result="FAILEXE"
34 nb_exe_failed=$(( $nb_exe_failed + 1 ))
36 else
37 result="FAIL"
38 nb_failed=$(( $nb_failed + 1 ))
40 echo "$result: $src" >> tcc.sum
41 done
43 echo "$nb_ok test(s) ok." >> tcc.sum
44 echo "$nb_ok test(s) ok."
45 echo "$nb_failed test(s) failed." >> tcc.sum
46 echo "$nb_failed test(s) failed."
47 echo "$nb_exe_failed test(s) exe failed." >> tcc.sum
48 echo "$nb_exe_failed test(s) exe failed."