OSDN Git Service

* doc/invoke.texi: Fix name of sched1 dump.
[pf3gnuchains/gcc-fork.git] / contrib / dg-cmp-results.sh
index f5a4f09..d291769 100755 (executable)
@@ -1,5 +1,5 @@
 #!/bin/bash
-# Copyright (C) 2006 Free Software Foundation
+# Copyright (C) 2006, 2008 Free Software Foundation
 #
 # Analyze changes in GCC DejaGNU test logs for binutils, gcc, gdb, etc.
 # Original version written in 2005 by James Lemke <jwlemke@wasabisystems.com>.
@@ -27,11 +27,21 @@ while test "$1" = "-v"; do
     shift
 done
 
-if test $# -ne 3 -o ! -f "$2" -o ! -f "$3"; then
+if test $# -ne 3 ; then
     usage
     exit 1
 fi
 
+if test ! -f "$2"; then
+    echo "unable to open $2" >&2
+    exit 1
+fi
+
+if test ! -f "$3"; then
+    echo "unable to open $3" >&2
+    exit 1
+fi
+
 # Command differences for various platforms.
 case `uname -s` in
 Darwin|NetBSD)
@@ -135,7 +145,7 @@ function compare(st, nm) {
        # Compare this new test to the first queued old one.
        if (verbose >= 4) {
            printf("Comparing two lines:\n O:%s:%s\n N:%s:%s\n",
-            status[old], nm[old], st, nm)
+            status[old], name[old], st, nm)
        }
         if (name[old] != nm) {
            # The old test wasn't run this time and