1*4fee23f9Smrg#! /bin/sh 2*4fee23f9Smrg 3*4fee23f9Smrg# Test a "wrong-code" GCC bug, using environment variables set in 4*4fee23f9Smrg# several reghunt scripts and configuration files. 5*4fee23f9Smrg# 6*4fee23f9Smrg# Copyright (C) 2007 Free Software Foundation. 7*4fee23f9Smrg# 8*4fee23f9Smrg# This file is free software; you can redistribute it and/or modify 9*4fee23f9Smrg# it under the terms of the GNU General Public License as published by 10*4fee23f9Smrg# the Free Software Foundation; either version 3 of the License, or 11*4fee23f9Smrg# (at your option) any later version. 12*4fee23f9Smrg# 13*4fee23f9Smrg# This program is distributed in the hope that it will be useful, 14*4fee23f9Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 15*4fee23f9Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16*4fee23f9Smrg# GNU General Public License for more details. 17*4fee23f9Smrg# 18*4fee23f9Smrg# For a copy of the GNU General Public License, write the the 19*4fee23f9Smrg# Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 20*4fee23f9Smrg# Boston, MA 02111-1301, USA. 21*4fee23f9Smrg 22*4fee23f9SmrgID=$1 23*4fee23f9Smrg 24*4fee23f9SmrgLOGID=`printf "%04d" ${ID}` 25*4fee23f9SmrgLOG=${BUGID}.${LOGID}.out 26*4fee23f9SmrgMSGID="bug ${BUGID}, id ${ID}" 27*4fee23f9Smrg 28*4fee23f9Smrg$REG_TEST_COMPILER $REG_OPTS $REG_TESTCASE > ${LOG} 2>&1 29*4fee23f9Smrg 30*4fee23f9Smrgif [ $? -ne 0 ]; then 31*4fee23f9Smrg echo "`date` unexpected failure: test compilation failed for ${MSGID}" 32*4fee23f9Smrg exit $REG_ERROR 33*4fee23f9Smrgfi 34*4fee23f9Smrg 35*4fee23f9Smrg./a.out >> ${LOG} 2>&1 36*4fee23f9Smrgif [ $? -ne 0 ]; then 37*4fee23f9Smrg echo "`date` test run aborted for ${MSGID}" 38*4fee23f9Smrg exit $REG_FAIL 39*4fee23f9Smrgfi 40*4fee23f9Smrg 41*4fee23f9Smrgecho "`date` test ran successfully for ${MSGID}" 42*4fee23f9Smrgexit $REG_PASS 43