OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [contrib/] [reghunt/] [bin/] [gcc-test-segfault-on-valid-code] - Blame information for rev 723

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 723 jeremybenn
#! /bin/sh
2
 
3
# Test an "ice-on-valid-code" GCC bug that results in a compiler
4
# segfault, using environment variables set in several reghunt scripts
5
# and configuration files.
6
#
7
# Copyright (C) 2007 Free Software Foundation.
8
#
9
# This file is free software; you can redistribute it and/or modify
10
# it under the terms of the GNU General Public License as published by
11
# the Free Software Foundation; either version 3 of the License, or
12
# (at your option) any later version.
13
#
14
# This program is distributed in the hope that it will be useful,
15
# but WITHOUT ANY WARRANTY; without even the implied warranty of
16
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17
# GNU General Public License for more details.
18
#
19
# For a copy of the GNU General Public License, write the the
20
# Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
21
# Boston, MA 02111-1301, USA.
22
 
23
ID=$1
24
 
25
LOGID=`printf "%04d" ${ID}`
26
LOG=${BUGID}.${LOGID}.out
27
MSGID="bug ${BUGID}, id ${ID}"
28
 
29
$REG_TEST_COMPILER $REG_OPTS $REG_TESTCASE > ${LOG} 2>&1
30
 
31
if [ $? -eq 0 ]; then
32
    echo "`date`  test compiled successfully for ${MSGID}"
33
    exit $REG_PASS
34
fi
35
 
36
grep -q 'No such file or directory' ${LOG}
37
if [ $? -eq 0 ]; then
38
    echo "`date`    unexpected failure: missing file for ${MSGID}"
39
    exit $REG_ERROR
40
fi
41
 
42
grep -q 'egmentation fault' ${LOG}
43
if [ $? -ne 0 ]; then
44
    echo "`date`    unexpected failure: no segfault message for ${MSGID}"
45
    exit $REG_ERROR
46
fi
47
 
48
echo "`date`  compilation failed for ${MSGID}"
49
exit $REG_FAIL

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.