1 # Copyright (C) 2016-2019 Free Software Foundation, Inc.
3 # This file is part of GCC.
5 # GCC is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 3, or (at your option)
10 # GCC is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
15 # You should have received a copy of the GNU General Public License
16 # along with GCC; see the file COPYING3. If not see
17 # <http://www.gnu.org/licenses/>.
19 # GCC testsuite that uses the `dg.exp' driver.
27 proc param_run_test { param_name param_value } {
31 dg-runtest $srcdir/$subdir/blocksort-part.c "-O3 --param $param_name=$param_value" ""
34 set options_file "$objdir/../../params.options"
35 if { [info exists TESTING_IN_BUILD_TREE] == 0 } {
39 set fd [open $options_file r]
44 foreach params [split $text "\n"] {
45 set parts [split $params "="]
46 set name [string trim [lindex $parts 0] '"']
47 set values [split [lindex $parts 1] ","]
48 if { [llength $values] == 3 } {
49 set default [lindex $values 0]
50 set min [lindex $values 1]
51 set max [lindex $values 2]
55 param_run_test $name $min
57 if { $max != $min && $max > 0 && $max != $int_max } {
58 param_run_test $name $max
61 if { [llength $values] == 5 } {
63 param_run_test $name $v