OSDN Git Service

Various changes from devo.
authorlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 18 Nov 1997 19:36:21 +0000 (19:36 +0000)
committerlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 18 Nov 1997 19:36:21 +0000 (19:36 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@16568 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/testsuite/ChangeLog
gcc/testsuite/g++.old-deja/g++.brendan/asm-extn1.C
gcc/testsuite/g++.old-deja/g++.mike/eh1.C
gcc/testsuite/g++.old-deja/g++.mike/eh10.C
gcc/testsuite/g++.old-deja/g++.mike/p7325.C
gcc/testsuite/gcc.c-torture/ChangeLog
gcc/testsuite/gcc.c-torture/execute/conversion.c
gcc/testsuite/gcc.c-torture/execute/ieee/ieee.exp
gcc/testsuite/lib/c-torture.exp
gcc/testsuite/lib/old-dejagnu.exp

index e2003c0..55df5ae 100644 (file)
@@ -1,12 +1,34 @@
-Mon Oct  6 12:03:10 1997  Jeffrey A Law  (law@cygnus.com)
+Fri Sep 26 10:50:53 1997  Bob Manson  <manson@charmed.cygnus.com>
 
-       * lib/g77.exp, lib/f-torture.exp: New files.
+       * lib/c-torture.exp(c-torture-execute): Fix typo.
+
+       * lib/old-dejagnu.exp(old-dejagnu): Use a name derived from the
+       testcase as the executable name. Keep the executable around if
+       the test fails.
+
+Fri Sep 19 17:19:53 1997  Bob Manson  <manson@charmed.cygnus.com>
+
+       * lib/c-torture.exp (TORTURE_OPTIONS): Removed unnecessary
+       changes.  Only test one -g option, and move it to the end of the
+       list of options to test.
+
+Fri Sep 19 17:58:00 1997  Michael Meissner  <meissner@cygnus.com>
+
+       * lib/c-torture.exp (TORTURE_OPTIONS): Check for the environment
+       variable GCC_TORTURE_OPTIONS to supply default switches separated
+       by colons.  If no environment variable, run tests with -O0 -g, -O1
+       -g, and -O2 -g as well.
+
+Wed Sep 17 10:12:26 1997  Bob Manson  <manson@charmed.cygnus.com>
+
+       * lib/plumhall.exp: Don't set PHSRC in this file. Add a few
+       explanatory comments. Fix indentation.
 
 Mon Sep 15 00:36:53 1997  Jeffrey A Law  (law@cygnus.com)
 
        * lib/g++.exp (g++_init): Look for xgcc in $basedir too.
-       
-Thu Sep 11 13:52:01 1997  Jeffrey A Law  (law@cygnus.com)
+
+Thu Sep 11 13:54:47 1997  Jeffrey A Law  (law@cygnus.com)
 
        * g++.old-deja/g++.brendan/scope4.C: No longer expected to fail.
        * g++.old-deja/g++.mike/p7325.C: Likewise.
@@ -25,9 +47,17 @@ Thu Sep 11 09:53:40 1997  Joe Buck  (jbuck@synopsys.com)
        * g++.old-deja/g++.mike/p784.C: Ditto.
        * g++.old-deja/g++.mike/p785.C: Ditto.
 
-Fri Sep  5 00:20:39 1997  Richard Henderson  (rth@cygnus.com)
+Fri Sep  5 00:21:42 1997  Jeffrey A Law  (law@cygnus.com)
+
+        * gcc.c-torture/execute/cbrt.c: Tweak to work on more targets.
+
+Wed Sep  3 17:15:00 1997  Bob Manson  <manson@charmed.cygnus.com>
 
-       * cbrt.c: Tweak to work on more targets.
+       * lib/c-torture.exp(c-torture-execute): If the previous and the
+       current executables being tested are identical, we don't need to
+       run the executable again. Try to make the executable names
+       unique. Add an optional argument for passing additional compiler
+       flags.
 
 Tue Sep  2 16:34:31 1997  Doug Evans  <dje@canuck.cygnus.com>
 
index a388a61..821bd0c 100644 (file)
@@ -1,7 +1,7 @@
 // Build don't link: 
 // Special g++ Options: -S
 // GROUPS passed asm-extension
-// excess errors test - XFAIL a29k-*-*
+// excess errors test - XFAIL a29k-*-* mn10300-elf
 // This used to crash because c_expand_asm_keyword didn't know what to
 // do with this.  The parser rules were changed to accept an expr, instead
 // of a stmt.
index faa48ee..95da594 100644 (file)
@@ -3,6 +3,7 @@
 
 extern "C" void printf (char *, ...);
 extern "C" int atoi (const char *);
+extern "C" void exit (int);
 
 struct Exception
  {
@@ -10,7 +11,7 @@ struct Exception
      Exception(int i) { v = i; };
  };
 
- inc(int &i)
void inc(int &i)
  {
      try {
          if (i == 0)
index a6ada1f..2541f27 100644 (file)
@@ -9,7 +9,7 @@ void foo() {
 
 void ee(int *);
 
-bar() {
+void bar() {
   int i = 2;
   ee(&i);
 }
index f7b04cf..8402a36 100644 (file)
@@ -1,6 +1,7 @@
 // I hate this type of test case.  I'm not sure how to code it better.
 // See the PR for what this tests.
 // prms-id: 7325
+// execution test fails *-*-*
 
 int fail = 0;
 
index 0428980..b4a4684 100644 (file)
@@ -1,7 +1,25 @@
-Fri Aug 29 12:46:05 1997  Jeffrey A Law  (law@cygnus.com)
+Wed Sep  3 17:29:35 1997  Bob Manson  <manson@charmed.cygnus.com>
+
+       * execute/ieee/ieee.exp: Check for ieee_multilib_flags target
+       feature; pass this to c-torture-execute as needed.
+
+Fri Aug 29 12:48:09 1997  Jeffrey A Law  (law@cygnus.com)
 
        * execute/921007-1.c: Make strcmp static.
 
+Tue Jul 29 00:40:38 1997  J"orn Rennecke <amylaar@cygnus.co.uk>
+
+       * conversion.c (test_float_to_integer): Make double precision tests
+       dependent on sizeof (double).
+
+Tue Jun 17 22:11:16 1997  J"orn Rennecke <amylaar@cygnus.co.uk>
+
+       * compile/961203-1.cexp: New script.
+
+Wed Jun  4 03:38:50 1997  J"orn Rennecke <amylaar@cygnus.co.uk>
+
+       * execute/ieee/ieee.exp: Set -mieee for SH.
+
 Thu May 15 14:00:04 1997  Mike Meissner  <meissner@cygnus.com>
 
        * execute/va-arg-3.c: If NO_VARARGS is defined, nop test.
index 5f35872..fc69d62 100644 (file)
@@ -207,6 +207,11 @@ test_float_to_integer()
   if (f2u((float) ~((~0U) >> 1)) != ~((~0U) >> 1))     /* 0x80000000 */
     abort();
 
+ /* CYGNUS LOCAL -- amylaar/32bit doubles */
+ /* These tests require double precision, so for hosts that don't offer
+    that much precision, just ignore these test.  */
+ if (sizeof (double) >= 8) {
+ /* END CYGNUS LOCAL -- amylaar/32bit doubles */
   if (d2u(0.0) != 0)
     abort();
   if (d2u(0.999) != 0)
@@ -221,6 +226,9 @@ test_float_to_integer()
     abort();
   if (d2u((double) ~((~0U) >> 1)) != ~((~0U) >> 1))    /* 0x80000000 */
     abort();
+ /* CYGNUS LOCAL -- amylaar/32bit doubles */
+ }
+ /* END CYGNUS LOCAL -- amylaar/32bit doubles */
 
 
   if (f2s(0.0) != 0)
@@ -240,6 +248,11 @@ test_float_to_integer()
   if (f2s((float)(int)~((~0U) >> 1)) != (int)~((~0U) >> 1)) /* 0x80000000 */
     abort();
 
+ /* CYGNUS LOCAL -- amylaar/32bit doubles */
+ /* These tests require double precision, so for hosts that don't offer
+    that much precision, just ignore these test.  */
+ if (sizeof (double) >= 8) {
+ /* END CYGNUS LOCAL -- amylaar/32bit doubles */
   if (d2s(0.0) != 0)
     abort();
   if (d2s(0.999) != 0)
@@ -258,6 +271,9 @@ test_float_to_integer()
     abort();
   if (d2s((double)(int)~((~0U) >> 1)) != (int)~((~0U) >> 1)) /* 0x80000000 */
     abort();
+ /* CYGNUS LOCAL -- amylaar/32bit doubles */
+ }
+ /* END CYGNUS LOCAL -- amylaar/32bit doubles */
 }
 
 #if __GNUC__
index 795dbf1..55f7f27 100644 (file)
@@ -28,11 +28,17 @@ if $tracelevel then {
     strace $tracelevel
 }
 
+if [target_info exists ieee_multilib_flags] {
+    set additional_flags [target_info ieee_multilib_flags];
+} else {
+    set additional_flags "";
+}
+
 # load support procs
 load_lib c-torture.exp
 
 # initialize harness
-gcc_init 
+gcc_init
 
 #
 # main test loop
@@ -44,7 +50,7 @@ foreach src [lsort [glob -nocomplain $srcdir/$subdir/*.c]] {
        continue
     }
 
-    c-torture-execute $src
+    c-torture-execute $src $additional_flags
 }
 
 # All done.
index 76732ec..3e77d6c 100644 (file)
 # TORTURE_OPTIONS="{ { list1 } ... { listN } }"
 
 if ![info exists TORTURE_OPTIONS] {
-    # FIXME: We should test -g at least once.
+    # It is theoretically beneficial to group all of the O2 options together,
+    # as in many cases the compiler will generate identical executables for
+    # all of them--and the c-torture testsuite will skip testing identical
+    # executables multiple times.
     set TORTURE_OPTIONS [list \
        { -O0 } { -O1 } { -O2 } \
        { -O2 -fomit-frame-pointer -finline-functions } \
        { -O2 -fomit-frame-pointer -finline-functions -funroll-loops } \
-       { -O2 -fomit-frame-pointer -finline-functions -funroll-all-loops }]
+       { -O2 -fomit-frame-pointer -finline-functions -funroll-all-loops } \
+       { -O2 -g } ]
 }
 
 
@@ -130,9 +134,14 @@ proc c-torture-compile { src option } {
 # run the compile.exp tests for example - one need only pass compile.exp to
 # dejagnu, and not compile.exp, foo1.exp, foo2.exp, etc.).
 #
-proc c-torture-execute { src } {
+proc c-torture-execute { src args } {
     global tmpdir tool srcdir output 
 
+    if { [llength $args] > 0 } {
+       set additional_flags [lindex $args 0];
+    } else {
+       set additional_flags "";
+    }
     # Check for alternate driver.
     if [file exists [file rootname $src].cexp] {
        verbose "Using alternate driver [file rootname [file tail $src]].cexp" 2
@@ -163,31 +172,42 @@ proc c-torture-execute { src } {
        set testcase "[file tail [file dirname $src]]/[file tail $src]"
     }
 
+    set count 0;
+    set oldstatus "foo";
     foreach option $option_list {
+       if { $count > 0 } {
+           set oldexec $execname;
+       }
+       set execname "${executable}${count}";
+       incr count;
+
        # torture_{compile,execute}_xfail are set by the .cexp script
        # (if present)
        if [info exists torture_compile_xfail] {
            setup_xfail $torture_compile_xfail
        }
-       remote_file build delete $executable
+       remote_file build delete $execname;
        verbose "Testing $testcase, $option" 1
 
        set options ""
        lappend options "additional_flags=-w $option"
-       set comp_output [gcc_target_compile "$src" "$executable" executable $options];
+       if { $additional_flags != "" } {
+           lappend options "additional_flags=$additional_flags";
+       }
+       set comp_output [gcc_target_compile "$src" "${execname}" executable $options];
 
        # Set a few common compiler messages.
        set fatal_signal "*cc: Internal compiler error: program*got fatal signal"
        
        if [string match "$fatal_signal 6" $comp_output] then {
            gcc_fail $testcase "Got Signal 6, $option"
-           remote_file build delete $executable
+           remote_file build delete $execname
            continue
        }
        
        if [string match "$fatal_signal 11" $comp_output] then {
            gcc_fail $testcase "Got Signal 11, $option"
-           remote_file build delete $executable
+           remote_file build delete $execname
            continue
        }
        
@@ -196,7 +216,7 @@ proc c-torture-execute { src } {
            warning "$testcase: (with warnings) $option"
            send_log "$comp_output\n"
            unresolved "$testcase, $option"
-           remote_file build delete $executable
+           remote_file build delete $execname
            continue
        }
        
@@ -207,7 +227,7 @@ proc c-torture-execute { src } {
        if { $unsupported_message != "" } {
            unsupported "$testcase: $unsupported_message"
            continue
-       } elseif ![file exists $executable] {
+       } elseif ![file exists $execname] {
            if ![is3way] {
                fail "$testcase compilation, $option"
                untested "$testcase execution, $option"
@@ -234,14 +254,27 @@ proc c-torture-execute { src } {
        if [info exists torture_execute_xfail] {
            setup_xfail $torture_execute_xfail
        }
-       
-       set result [gcc_load "$executable" "" ""]
-       set status [lindex $result 0];
-       set output [lindex $result 1];
-        if { $status == "pass" } {
-           remote_file build delete $executable
+       set skip 0;
+       if [info exists oldexec] {
+           if { [remote_file build cmp $oldexec $execname] == 0 } {
+               set skip 1;
+           }
+       }
+       if { $skip == 0 } {
+           set result [gcc_load "$execname" "" ""]
+           set status [lindex $result 0];
+           set output [lindex $result 1];
+       }
+        if { $oldstatus == "pass" } {
+           remote_file build delete $oldexec;
         }
        $status "$testcase execution, $option"
+       set oldstatus $status;
+    }
+    if [info exists status] {
+       if { $status == "pass" } {
+           remote_file build delete $execname;
+       }
     }
 }
 
index cd7f46b..02f84a4 100644 (file)
@@ -230,7 +230,8 @@ proc old-dejagnu { compiler prog cflagsx default_cflags libs } {
 
     lappend cflags "compiler=$compiler"
 
-    set output "$tmpdir/a.out"
+    regsub -all "\[./\]" "$name" "-" output;
+    set output "$tmpdir/$output";
     set compile_type "executable"
 
     set tmp [lindex [grep $prog "Build don.t link:"] 0]
@@ -522,7 +523,9 @@ proc old-dejagnu { compiler prog cflagsx default_cflags libs } {
            set result [eval [format "%s_load %s" $tool $executable]]
            set status [lindex $result 0];
            set output [lindex $result 1];
-           remote_file build delete $executable;
+           if { $status == "pass" } {
+               remote_file build delete $executable;
+           }
            if { $execbug_flag || $excessbug_flag } then {
                setup_xfail "*-*-*"
            }