From: Bernhard Reutner-Fischer Date: Wed, 31 May 2023 18:41:57 +0000 (+0200) Subject: testsuite: rename force_conventional_output X-Git-Tag: basepoints/gcc-15~8690 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=994195b597ff20a39da9a815ce0722d8f808f4a0;p=thirdparty%2Fgcc.git testsuite: rename force_conventional_output The procedure force_conventional_output_for is a bit misnomed, what it primarily does is to set the required options for the corresponding test. So rename the proc to set_required_options_for and also rename the participating variable accordingly. gcc/testsuite/ChangeLog: * lib/gcc-dg.exp: Rename gcc_force_conventional_output to gcc_set_required_options. * lib/target-supports.exp: Rename force_conventional_output_for to set_required_options_for. * lib/scanasm.exp: Adjust callers. * lib/scanrtl.exp: Same. --- diff --git a/gcc/testsuite/lib/gcc-dg.exp b/gcc/testsuite/lib/gcc-dg.exp index 4ed4233efff9..01c8c022a037 100644 --- a/gcc/testsuite/lib/gcc-dg.exp +++ b/gcc/testsuite/lib/gcc-dg.exp @@ -70,8 +70,8 @@ if { $orig_environment_saved == 0 } { # Some torture-options cause intermediate code output, unusable for # testing using e.g. scan-assembler. In this variable are the options # how to force it, when needed. -global gcc_force_conventional_output -set gcc_force_conventional_output "" +global gcc_set_required_options +set gcc_set_required_options "" if [info exists TORTURE_OPTIONS] { set DG_TORTURE_OPTIONS $TORTURE_OPTIONS @@ -92,7 +92,7 @@ if [info exists TORTURE_OPTIONS] { { -Os } ] if [check_effective_target_lto] { - set gcc_force_conventional_output "-ffat-lto-objects" + set gcc_set_required_options "-ffat-lto-objects" } } diff --git a/gcc/testsuite/lib/scanasm.exp b/gcc/testsuite/lib/scanasm.exp index be2b83a5dd48..0685de1d6417 100644 --- a/gcc/testsuite/lib/scanasm.exp +++ b/gcc/testsuite/lib/scanasm.exp @@ -106,7 +106,7 @@ proc scan-assembler { args } { dg-scan "scan-assembler" 1 $testcase $output_file $args } -force_conventional_output_for scan-assembler +set_required_options_for scan-assembler # Check that a pattern is not present in the .s file produced by the # compiler. See dg-scan for details. @@ -120,7 +120,7 @@ proc scan-assembler-not { args } { dg-scan "scan-assembler-not" 0 $testcase $output_file $args } -force_conventional_output_for scan-assembler-not +set_required_options_for scan-assembler-not # Return the scan for the assembly for hidden visibility. @@ -497,7 +497,7 @@ proc scan-assembler-times { args } { } } -force_conventional_output_for scan-assembler-times +set_required_options_for scan-assembler-times # Utility for scanning demangled compiler result, invoked via dg-final. # Call pass if pattern is present, otherwise fail. diff --git a/gcc/testsuite/lib/scanrtl.exp b/gcc/testsuite/lib/scanrtl.exp index 3a20ee480cbe..b8fab3d55a3b 100644 --- a/gcc/testsuite/lib/scanrtl.exp +++ b/gcc/testsuite/lib/scanrtl.exp @@ -44,7 +44,7 @@ proc scan-rtl-dump { args } { } } -force_conventional_output_for scan-rtl-dump +set_required_options_for scan-rtl-dump # Call pass if pattern is present given number of times, otherwise fail. # Argument 0 is the regexp to match @@ -71,7 +71,7 @@ proc scan-rtl-dump-times { args } { } } -force_conventional_output_for scan-rtl-dump-times +set_required_options_for scan-rtl-dump-times # Call pass if pattern is not present, otherwise fail. # @@ -98,7 +98,7 @@ proc scan-rtl-dump-not { args } { } } -force_conventional_output_for scan-rtl-dump-not +set_required_options_for scan-rtl-dump-not # Utility for scanning demangled compiler result, invoked via dg-final. # Call pass if pattern is present, otherwise fail. @@ -126,7 +126,7 @@ proc scan-rtl-dump-dem { args } { } } -force_conventional_output_for scan-rtl-dump-dem +set_required_options_for scan-rtl-dump-dem # Call pass if demangled pattern is not present, otherwise fail. # @@ -153,4 +153,4 @@ proc scan-rtl-dump-dem-not { args } { } } -force_conventional_output_for scan-rtl-dump-dem-not +set_required_options_for scan-rtl-dump-dem-not diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index 263ef35a2e4d..431a56f0be51 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -11262,20 +11262,20 @@ proc check_effective_target_branch_cost {} { # Record that dg-final test TEST requires convential compilation. -proc force_conventional_output_for { test } { +proc set_required_options_for { test } { if { [info proc $test] == "" } { perror "$test does not exist" exit 1 } proc ${test}_required_options {} { - global gcc_force_conventional_output + global gcc_set_required_options upvar 1 extra_tool_flags extra_tool_flags if {[regexp -- "^scan-assembler" [info level 0]] && ![string match "*-fident*" $extra_tool_flags]} { # Do not let .ident confuse assembler scan tests - return [list $gcc_force_conventional_output "-fno-ident"] + return [list $gcc_set_required_options "-fno-ident"] } - return $gcc_force_conventional_output + return $gcc_set_required_options } }