OSDN Git Service

2010-04-26 Iain Sandoe <iain.sandoe@sandoe-acoustics.co.uk>
authormrs <mrs@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 27 Apr 2010 00:08:28 +0000 (00:08 +0000)
committerMasaki Muranaka <monaka@monami-software.com>
Sun, 23 May 2010 05:36:04 +0000 (14:36 +0900)
PR testsuite/35165
* obj-c++.dg/stubify-2.mm: Restrict to ilp32 targets.  Require
Darwin8/OSX10.4 - compatible code generation.
Use scan-rtl-dump.
* obj-c++.dg/stubify-1.mm: Ditto.
* lib/objc-torture.exp: Do not require link success for
"trivial.m" in the runtime checks when dowhat = 'compile'.
* lib/dg-pch.exp: (dg-flags-pch): New Proc.
* objc.dg/stubify-1.m:  Restrict to ilp32 targets.  Require
Darwin8/OSX10.4 - compatible code generation.
* objc.dg/stubify-2.m: Ditto.
* objc.dg/symtab-1.m: Match '.quad' for m64 code.
* objc.dg/next-runtime-1.m: Ditto.
* objc.dg/stret-2.m: Restrict to ilp32 targets.
* objc.dg/pch/pch.exp: Apply tests to both Gnu and NeXT
runtimes on Darwin.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@158752 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/testsuite/ChangeLog
gcc/testsuite/lib/objc-torture.exp
gcc/testsuite/obj-c++.dg/stubify-2.mm
gcc/testsuite/objc.dg/stret-2.m
gcc/testsuite/objc.dg/stubify-1.m
gcc/testsuite/objc.dg/stubify-2.m

index d9a1929..10ba632 100644 (file)
@@ -1,3 +1,22 @@
+2010-04-26  Iain Sandoe  <iain.sandoe@sandoe-acoustics.co.uk>
+
+       PR testsuite/35165
+       * obj-c++.dg/stubify-2.mm: Restrict to ilp32 targets.  Require
+       Darwin8/OSX10.4 - compatible code generation.
+       Use scan-rtl-dump.
+       * obj-c++.dg/stubify-1.mm: Ditto.
+       * lib/objc-torture.exp: Do not require link success for
+       "trivial.m" in the runtime checks when dowhat = 'compile'.
+       * lib/dg-pch.exp: (dg-flags-pch): New Proc.
+       * objc.dg/stubify-1.m:  Restrict to ilp32 targets.  Require
+       Darwin8/OSX10.4 - compatible code generation.
+       * objc.dg/stubify-2.m: Ditto.
+       * objc.dg/symtab-1.m: Match '.quad' for m64 code.
+       * objc.dg/next-runtime-1.m: Ditto.
+       * objc.dg/stret-2.m: Restrict to ilp32 targets.
+       * objc.dg/pch/pch.exp: Apply tests to both Gnu and NeXT
+       runtimes on Darwin.
+
 2010-04-26  Jack Howarth <howarth@bromo.med.uc.edu>
 
        PR 43715
index 0b6362b..a3d1ef2 100644 (file)
@@ -46,28 +46,55 @@ proc objc-set-runtime-options { dowhat args } {
            lappend options $args
        }
        verbose "options $options"
-       set test_obj "trivial.exe"
-       set comp_output [objc_target_compile \
-       "$srcdir/$subdir/trivial.m" $test_obj executable $options]
-
-       # If we get any error, then we failed.
-       if ![string match "" $comp_output] then {
-           remote_file build delete $test_obj
-           continue;
-       }
        if [info exists dowhat] {
-           if { $dowhat == "execute" } {
-               set result [objc_load "$tmpdir/$test_obj" "" ""]
-               set status [lindex $result 0]
-               set output [lindex $result 1]
-               if { $status != "pass" } {
-                   remote_file build delete $test_obj
-                   verbose -log "trivial execute failed with $status $output"
-                   continue;
-               }
+          switch $dowhat {
+           "compile" {
+             set compile_type "assembly"
+             set output_file "trivial.s"
+             set comp_output [objc_target_compile \
+               "$srcdir/$subdir/trivial.m" "$output_file" "$compile_type" $options]
+
+             remote_file build delete $output_file
+             # If we get any error, then we failed.
+             if ![string match "" $comp_output] then {
+               continue;
+             }
+           }
+           "execute" {
+             set test_obj "trivial.exe"
+             set comp_output [objc_target_compile \
+               "$srcdir/$subdir/trivial.m" $test_obj "executable" $options]
+
+             # If we get any error, then we failed.
+             if ![string match "" $comp_output] then {
+               remote_file build delete $test_obj
+               continue;
+             }
+             set result [objc_load "$tmpdir/$test_obj" "" ""]
+             set status [lindex $result 0]
+             set output [lindex $result 1]
+             remote_file build delete $test_obj
+             if { $status != "pass" } {
+               verbose -log "trivial execute failed with $status $output"
+               continue;
+             }
+           }
+           default {
+             perror "$dowhat: not a valid objc-torture action"
+             return ""
            }
+         }
+       } else {
+         set test_obj "trivial.exe"
+         set comp_output [objc_target_compile \
+         "$srcdir/$subdir/trivial.m" $test_obj executable $options]
+
+         # If we get any error, then we failed.
+         remote_file build delete $test_obj
+         if ![string match "" $comp_output] then {
+             continue;
+         }
        }
-       remote_file build delete $test_obj
        lappend OBJC_RUNTIME_OPTIONS $type
     }
 
index a544698..9968672 100644 (file)
@@ -29,5 +29,5 @@ extern int bogonic (int, int, int) ;
 @end
 
 /* Any symbol_ref of an un-stubified objc_msgSend is an error; look
-   for "objc_msgSend" in quotes, without the $stub suffix.  */
-/* { dg-final { scan-file-not stubify-2.mm.147r.jump "symbol_ref.*\"objc_msgSend\"" } } */
+   for "objc_msgSend" in quotes, without the $stub suffix. */
+/* { dg-final {  scan-rtl-dump-not "symbol_ref.*\"objc_msgSend\"" "jump" } } */
index ded3ae4..fccda32 100644 (file)
@@ -4,6 +4,7 @@
 /* Contributed by Ziemowit Laski <zlaski@apple.com>.  */
 /* { dg-do compile { target *-*-darwin* } } */
 /* { dg-skip-if "" { *-*-* } { "-fgnu-runtime" } { "" } } */
+/* { dg-require-effective-target ilp32 } */
 
 #include "../objc-obj-c++-shared/Object1.h"
 
index 72de75b..91bf73a 100644 (file)
@@ -3,7 +3,8 @@
 
 /* { dg-do compile { target *-*-darwin* } } */
 /* { dg-skip-if "" { *-*-* } { "-fgnu-runtime" } { "" } } */
-/* { dg-options "-Os -mdynamic-no-pic" } */
+/* { dg-require-effective-target ilp32 } */
+/* { dg-options "-Os -mdynamic-no-pic -mmacosx-version-min=10.4" } */
 
 typedef struct objc_object { } *id ;
 int x = 41 ;
index d32c1fb..eaf4b96 100644 (file)
@@ -1,9 +1,10 @@
 /* All calls must be properly stubified, m32 only.  */
 /* Testcase extracted from TextEdit:Document.m.  */
 
-/* { dg-do compile { target *-*-darwin* } } */
+/* { dg-do compile { target powerpc*-*-darwin* } } */
 /* { dg-skip-if "" { *-*-* } { "-fgnu-runtime" } { "" } } */
-/* { dg-options "-mdynamic-no-pic -fdump-rtl-jump" } */
+/* { dg-require-effective-target ilp32 } */
+/* { dg-options "-mdynamic-no-pic -fdump-rtl-jump -mmacosx-version-min=10.4" } */
 
 typedef struct objc_object { } *id ;
 int x = 41 ;