public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [pph] Restore -fno-dwarf2-cfi-asm. (issue4992051)
@ 2011-09-13  2:07 Lawrence Crowl
  0 siblings, 0 replies; only message in thread
From: Lawrence Crowl @ 2011-09-13  2:07 UTC (permalink / raw)
  To: reply, dnovillo, gcc-patches

Restore compiling the tests with -fno-dwarf2-cfi-asm.  Failure to do
so results in different assembly output on different platforms due to
different assembler support for exceptions.


Index: gcc/testsuite/ChangeLog.pph

2011-09-12   Lawrence Crowl  <crowl@google.com>

        * lib/dg-pph.exp: Restore -fno-dwarf2-cfi-asm option for
        stability across platforms.


Index: gcc/testsuite/lib/dg-pph.exp
===================================================================
--- gcc/testsuite/lib/dg-pph.exp	(revision 178792)
+++ gcc/testsuite/lib/dg-pph.exp	(working copy)
@@ -19,10 +19,13 @@
 
 load_lib copy-file.exp
 
+# Options needed for assembly stability across platforms.
+set stable "-fno-dwarf2-cfi-asm"
+
 # Generate a PPH image from a header file.
 proc dg-pph-hdr { subdir test options mapflag suffix } {
 
-    global runtests dg-do-what-default
+    global runtests dg-do-what-default stable
 
     # If we're only testing specific files and this isn't one of them, skip it.
     if { ![runtest_file_p $runtests $test] } {
@@ -34,7 +37,7 @@ proc dg-pph-hdr { subdir test options ma
     verbose -log "\nTesting $nshort, $options"
 
     set dg-do-what-default preparse
-    dg-test -keep-output $test "-fpph-gen $options $mapflag -I." ""
+    dg-test -keep-output $test "-fpph-gen $options $mapflag $stable" ""
 
     if { [file_on_host exists "$bname.s"] } {
 	file_on_host delete "$bname.s"
@@ -45,7 +48,7 @@ proc dg-pph-hdr { subdir test options ma
 # as they represent files that are not compatible with PPH.
 proc dg-pph-neg { subdir test options mapflag suffix } {
 
-    global runtests dg-do-what-default
+    global runtests dg-do-what-default stable
 
     # If we're only testing specific files and this isn't one of them, skip it.
     if { ![runtest_file_p $runtests $test] } {
@@ -57,7 +60,7 @@ proc dg-pph-neg { subdir test options ma
     verbose -log "\nTesting $nshort, $options"
 
     set dg-do-what-default compile
-    dg-test -keep-output $test "$options $mapflag -I. -fno-dwarf2-cfi-asm" ""
+    dg-test -keep-output $test "$options $mapflag $stable" ""
 
     if { [file_on_host exists "$bname.s"] } {
 	file_on_host delete "$bname.s"
@@ -71,7 +74,7 @@ proc dg-pph-neg { subdir test options ma
 # assembly outputs are identical.
 proc dg-pph-pos { subdir test options mapflag suffix } {
 
-    global runtests dg-do-what-default
+    global runtests dg-do-what-default stable
 
     # If we're only testing specific files and this isn't one of them, skip it.
     if { ![runtest_file_p $runtests $test] } {
@@ -109,7 +112,8 @@ proc dg-pph-pos { subdir test options ma
 	# Now, compile the file but prune the result to avoid considering
 	# it part of the testsuite.  We just want to compile it to provide
 	# a base assembly output to compare against.
-	set comp_output [g++-dg-test $test compile "$options $other_options"]
+        set full_options "$options $other_options $stable"
+	set comp_output [g++-dg-test $test compile "$full_options"]
 	set comp_output [g++-dg-prune $target_triplet $comp_output]
 
 	# Wanted assembly, so quit if it did not compile successfully.
@@ -127,7 +131,7 @@ proc dg-pph-pos { subdir test options ma
     verbose -log ""
 
     # Compile a second time using the PPH files.
-    dg-test -keep-output $test "$options $mapflag" ""
+    dg-test -keep-output $test "$options $mapflag $stable" ""
 
     if { !$is_asm } {
 	# No assembly means we cannot compare them,

--
This patch is available for review at http://codereview.appspot.com/4992051

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-09-12 22:50 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-13  2:07 [pph] Restore -fno-dwarf2-cfi-asm. (issue4992051) Lawrence Crowl

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).