view gcctestsuite.sh @ 450:cd7e1ce83b92

Implement alloca for x86 (grischka case_8). This implements alloca() on x86, at least for non-Windows. Unlike the grischka version, this patch handles both the bounded and non-bounded cases (when bounded, the alloca'd memory is covered), and when asked to allocate with 0 size, it returns 0 without any allocation. Modify the assembly files to adjust the amount of padding (the unused space after an allocation); this must be at least 1 for bounds-checking. It's recommended that the padding be identical for unchecked and bounded cases, because otherwise turning on bound-checking might change errors to non-errors.
author Rob Landley <rob@landley.net>
date Sat, 12 May 2007 00:20:07 -0400
parents 18347d6348fc
children
line wrap: on
line source

#!/bin/sh

TESTSUITE_PATH=$HOME/gcc/gcc-3.2/gcc/testsuite/gcc.c-torture
TCC="./tcc -B. -I. -DNO_TRAMPOLINES" 
rm -f tcc.sum tcc.log
nb_failed="0"

for src in $TESTSUITE_PATH/compile/*.c ; do
  echo $TCC -o /tmp/test.o -c $src 
  $TCC -o /tmp/test.o -c $src >> tcc.log 2>&1
  if [ "$?" == "0" ] ; then
     result="PASS"
  else
     result="FAIL"
     nb_failed=$[ $nb_failed + 1 ]
  fi
  echo "$result: $src"  >> tcc.sum
done

for src in $TESTSUITE_PATH/execute/*.c ; do
  echo $TCC $src 
  $TCC $src >> tcc.log 2>&1
  if [ "$?" == "0" ] ; then
     result="PASS"
  else
     result="FAIL"
     nb_failed=$[ $nb_failed + 1 ]
  fi
  echo "$result: $src"  >> tcc.sum
done

echo "$nb_failed test(s) failed." >> tcc.sum
echo "$nb_failed test(s) failed."