This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RFA: Skip largefile PCH test on Solaris 10 x86

As detailed in PR 14940, PCH on Solaris 10 x86 doesn't work very well:
there doesn't seem to be any way to get consistent addresses from
mmap.  Small PCH tests work, but big ones don't.  In practice, PCH is
probably not useful on this platform, but I'm not sure if we have a
good way to totally disable it.

In any case, in the interest of testsuite cleanliness, I'd like to
apply this patch, which skips largefile on Solaris 10 x86.
Technically, we should be XFAILing, not skipping, but I don't see a
good way to do this.  Janis, do you?  If not, is this patch OK?


Mark Mitchell
(650) 331-3385 x713

2007-05-07  Mark Mitchell  <>

	* gcc.dg/pch/pch.exp: Skip largefile on Solaris 10 x86.

Index: gcc.dg/pch/pch.exp
--- gcc.dg/pch/pch.exp	(revision 124476)
+++ gcc.dg/pch/pch.exp	(working copy)
@@ -37,20 +37,24 @@ foreach test [lsort [glob -nocomplain $s
     dg-pch $subdir $test [concat [list {-O0 -g}] $torture_without_loops] ".h"
-set test "largefile.c"
-set testh "largefile.hs"
-set f [open $test w]
-set v 0
-for { set v 0 } { $v < 10000 } { incr v } {
-    puts $f "#define MACRO_${v} \"1234567890\" \"$v\""
+# On Solaris 2, mmap does not return consistent addresses across
+# invocations.  See PR 14940.
+if { ! [istarget "i?86-*-solaris2.10" ] } {
+    set test "largefile.c"
+    set testh "largefile.hs"
+    set f [open $test w]
+    set v 0
+    for { set v 0 } { $v < 10000 } { incr v } {
+	puts $f "#define MACRO_${v} \"1234567890\" \"$v\""
+    }
+    puts $f "#include \"largefile.h\""
+    close $f
+    set f [open $testh w]
+    close $f
+    dg-pch $subdir $test [concat [list {-O0 -g}] $torture_without_loops] ".h"    
+    file delete $test
+    file delete $testh
-puts $f "#include \"largefile.h\""
-close $f
-set f [open $testh w]
-close $f
-dg-pch $subdir $test [concat [list {-O0 -g}] $torture_without_loops] ".h"    
-file delete $test
-file delete $testh
 set dg-do-what-default "$old_dg_do_what_default"

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]