Patchwork [testsuite] Require -ffat-lto-objects for scan-rtl-dump*

login
register
mail settings
Submitter Richard Sandiford
Date Jan. 19, 2014, 5:13 p.m.
Message ID <87ppnnlwsl.fsf@talisman.default>
Download mbox | patch
Permalink /patch/312385/
State New
Headers show

Comments

Richard Sandiford - Jan. 19, 2014, 5:13 p.m.
We don't compile to RTL or machine instructions for lean LTO objects,
so the scan-assembler tests force -ffat-lto-objects to be used instead.
This patch extends that to scan-rtl-dump*.

Tested on mips64-linux-gnu, where it fixes an UNRESOLVED on
gcc.target/mips/octeon2-pipe-1.c.  OK to install?

Thanks,
Richard


gcc/testsuite/
	* lib/target-supports.exp (force_conventional_output_for): New
	procedure.
	* lib/scanasm.exp (scan-assembler_required_options)
	(scan-assembler-not_required_options)
	(scan-assembler-times_required_options): Replace with
	force_conventional_output_fors.
	* lib/scanrtl.exp: Force conventional output for all rtl dump scans.
	* gcc.target/mips/octeon-pipe-1.c: Remove -ffat-lto-objects.
Mike Stump - Jan. 20, 2014, 8:35 p.m.
On Jan 19, 2014, at 9:13 AM, Richard Sandiford <rdsandiford@googlemail.com> wrote:
> We don't compile to RTL or machine instructions for lean LTO objects,
> so the scan-assembler tests force -ffat-lto-objects to be used instead.
> This patch extends that to scan-rtl-dump*.
> 
> Tested on mips64-linux-gnu, where it fixes an UNRESOLVED on
> gcc.target/mips/octeon2-pipe-1.c.  OK to install?

Ok.

Patch

Index: gcc/testsuite/lib/target-supports.exp
===================================================================
--- gcc/testsuite/lib/target-supports.exp	2014-01-19 10:17:01.078710840 +0000
+++ gcc/testsuite/lib/target-supports.exp	2014-01-19 10:17:01.196711753 +0000
@@ -5664,3 +5664,17 @@  proc check_effective_target_fenv_excepti
 	}
     } "-std=gnu99"]
 }
+
+# Record that dg-final test TEST requires convential compilation.
+
+proc force_conventional_output_for { test } {
+    if { [info proc $test] == "" } {
+	perror "$test does not exist"
+	exit 1
+    }
+    proc ${test}_required_options {} {
+	global gcc_force_conventional_output
+	return $gcc_force_conventional_output
+    }
+}
+
Index: gcc/testsuite/lib/scanasm.exp
===================================================================
--- gcc/testsuite/lib/scanasm.exp	2014-01-19 10:17:01.076710824 +0000
+++ gcc/testsuite/lib/scanasm.exp	2014-01-19 10:17:01.195711745 +0000
@@ -82,10 +82,7 @@  proc scan-assembler { args } {
     dg-scan "scan-assembler" 1 $testcase $output_file $args
 }
 
-proc scan-assembler_required_options { args } {
-    global gcc_force_conventional_output
-    return $gcc_force_conventional_output
-}
+force_conventional_output_for scan-assembler
 
 # Check that a pattern is not present in the .s file produced by the
 # compiler.  See dg-scan for details.
@@ -97,10 +94,7 @@  proc scan-assembler-not { args } {
     dg-scan "scan-assembler-not" 0 $testcase $output_file $args
 }
 
-proc scan-assembler-not_required_options { args } {
-    global gcc_force_conventional_output
-    return $gcc_force_conventional_output
-}
+force_conventional_output_for scan-assembler-not
 
 # Return the scan for the assembly for hidden visibility. 
 
@@ -259,10 +253,7 @@  proc scan-assembler-times { args } {
     }
 }
 
-proc scan-assembler-times_required_options { args } {
-    global gcc_force_conventional_output
-    return $gcc_force_conventional_output
-}
+force_conventional_output_for scan-assembler-times
 
 # Utility for scanning demangled compiler result, invoked via dg-final.
 # Call pass if pattern is present, otherwise fail.
Index: gcc/testsuite/lib/scanrtl.exp
===================================================================
--- gcc/testsuite/lib/scanrtl.exp	2014-01-19 10:17:01.076710824 +0000
+++ gcc/testsuite/lib/scanrtl.exp	2014-01-19 10:17:01.195711745 +0000
@@ -42,6 +42,8 @@  proc scan-rtl-dump { args } {
     }
 }
 
+force_conventional_output_for scan-rtl-dump
+
 # Call pass if pattern is present given number of times, otherwise fail.
 # Argument 0 is the regexp to match
 # Argument 1 is number of times the regexp must be found
@@ -66,6 +68,8 @@  proc scan-rtl-dump-times { args } {
     }
 }
 
+force_conventional_output_for scan-rtl-dump-times
+
 # Call pass if pattern is not present, otherwise fail.
 #
 # Argument 0 is the regexp to match
@@ -90,6 +94,8 @@  proc scan-rtl-dump-not { args } {
     }
 }
 
+force_conventional_output_for scan-rtl-dump-not
+
 # Utility for scanning demangled compiler result, invoked via dg-final.
 # Call pass if pattern is present, otherwise fail.
 #
@@ -115,6 +121,8 @@  proc scan-rtl-dump-dem { args } {
     }
 }
 
+force_conventional_output_for scan-rtl-dump-dem
+
 # Call pass if demangled pattern is not present, otherwise fail.
 #
 # Argument 0 is the regexp to match
@@ -139,3 +147,5 @@  proc scan-rtl-dump-dem-not { args } {
 			  "\[0-9\]\[0-9\]\[0-9\]r.[lindex $args 1]"
     }
 }
+
+force_conventional_output_for scan-rtl-dump-dem-not
Index: gcc/testsuite/gcc.target/mips/octeon-pipe-1.c
===================================================================
--- gcc/testsuite/gcc.target/mips/octeon-pipe-1.c	2014-01-19 10:17:01.076710824 +0000
+++ gcc/testsuite/gcc.target/mips/octeon-pipe-1.c	2014-01-19 10:17:01.194711738 +0000
@@ -1,6 +1,6 @@ 
 /* Check that we use the octeon pipeline description.  */
 /* { dg-do compile } */
-/* { dg-options "-march=octeon -fschedule-insns2 -fdump-rtl-sched2 -ffat-lto-objects" } */
+/* { dg-options "-march=octeon -fschedule-insns2 -fdump-rtl-sched2" } */
 /* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
 
 NOMIPS16 int f (int a, int b)