2 # Script to test if gcc's -combine option works properly.
4 TMPFILE1=out/tmp_testcompile1.c
5 TMPFILE2=out/tmp_testcompile.o
8 cat - > $TMPFILE1 <<EOF
9 struct ts { union { int u1; struct { int u2; }; }; };
10 void t1(struct ts *r);
13 $CC -c -fwhole-program -combine $TMPFILE1 $TMPFILE1 -o $TMPFILE2 > /dev/null 2>&1
16 #echo " Setting AVOIDCOMBINE=0" > /dev/fd/2
19 echo " Enabling AVOIDCOMBINE=1" > /dev/fd/2
23 rm -f $TMPFILE1 $TMPFILE2