summaryrefslogtreecommitdiff
path: root/contrib/reghunt/bin/gcc-test-missing-warning
diff options
context:
space:
mode:
authorjanis <janis@138bc75d-0d04-0410-961f-82ee72b054a4>2009-02-17 18:35:24 +0000
committerjanis <janis@138bc75d-0d04-0410-961f-82ee72b054a4>2009-02-17 18:35:24 +0000
commit42a8b5f0fd074548521460dca667b5fa46f711e9 (patch)
treeabbdf3e73b00c128324024b4ff8cc14c3916d638 /contrib/reghunt/bin/gcc-test-missing-warning
parentf460d1eeb2c023010373b2bd38496db86ca050c7 (diff)
downloadgcc-42a8b5f0fd074548521460dca667b5fa46f711e9.tar.gz
* bin: New directory.
* bin/reg-hunt: New. * bin/reg_periodic: New. * bin/gcc-svn-update: New. * bin/gcc-svn-update-fix: New. * bin/gcc-build-simple: New. * bin/gcc-build-full: New. * bin/gcc-cleanup: New. * bin/reg-test: New. * bin/reg-newmid: New. * bin/gcc-test-ice-on-valid-code: New. * bin/gcc-test-ice-on-invalid-code: New. * bin/gcc-test-compiler-hangs: New. * bin/gcc-test-missing-warning: New. * bin/gcc-test-bogus-warning: New. * bin/gcc-test-segfault-on-valid-code: New. * bin/gcc-test-rejects-valid: New. * bin/gcc-test-accepts-invalid: New. * bin/gcc-test-wrong-code: New. * bin/gcc-svn-patchlist: New. * bin/gcc-svn-checkfail: New. * bin/gcc-svn-recordfail: New. * bin/gcc-svn-report: New. * bin/gcc-svn-ids: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@144240 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'contrib/reghunt/bin/gcc-test-missing-warning')
-rwxr-xr-xcontrib/reghunt/bin/gcc-test-missing-warning42
1 files changed, 42 insertions, 0 deletions
diff --git a/contrib/reghunt/bin/gcc-test-missing-warning b/contrib/reghunt/bin/gcc-test-missing-warning
new file mode 100755
index 00000000000..0fc9b2dc8ea
--- /dev/null
+++ b/contrib/reghunt/bin/gcc-test-missing-warning
@@ -0,0 +1,42 @@
+#! /bin/sh
+
+# Test a "missing-warning" GCC bug, using environment variables set in
+# several reghunt scripts and configuration files.
+#
+# Copyright (C) 2007 Free Software Foundation.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# For a copy of the GNU General Public License, write the the
+# Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+# Boston, MA 02111-1301, USA.
+
+ID=$1
+
+LOGID=`printf "%04d" ${ID}`
+LOG=${BUGID}.${LOGID}.out
+MSGID="bug ${BUGID}, id ${ID}"
+
+$REG_TEST_COMPILER $REG_OPTS $REG_TESTCASE > ${LOG} 2>&1
+
+if [ $? -ne 0 ]; then
+ echo "`date` unexpected failure: compilation failed for ${MSGID}"
+ exit $REG_ERROR
+fi
+
+grep -q 'warning' ${LOG}
+if [ $? -eq 0 ]; then
+ echo "`date` warning detected for ${MSGID}"
+ exit $REG_PASS
+fi
+
+echo "`date` no warning for ${MSGID}"
+exit $REG_FAIL