TargetSave
int x_ix86_branch_cost
-;; -mdump-tune-features=
+;; -mdump-tune-features=
TargetSave
int x_ix86_dump_tunes
TargetSave
int x_ix86_force_align_arg_pointer
-;; -mforce-drap=
+;; -mforce-drap=
TargetSave
int x_ix86_force_drap
TargetSave
enum pmode x_ix86_pmode
-;; -mpreferred-stack-boundary=
+;; -mpreferred-stack-boundary=
TargetSave
int x_ix86_preferred_stack_boundary_arg
mfma4
Target Report Mask(ISA_FMA4) Var(ix86_isa_flags) Save
-Support FMA4 built-in functions and code generation
+Support FMA4 built-in functions and code generation.
mxop
Target Report Mask(ISA_XOP) Var(ix86_isa_flags) Save
-Support XOP built-in functions and code generation
+Support XOP built-in functions and code generation.
mlwp
Target Report Mask(ISA_LWP) Var(ix86_isa_flags) Save
-Support LWP built-in functions and code generation
+Support LWP built-in functions and code generation.
mabm
Target Report Mask(ISA_ABM) Var(ix86_isa_flags) Save
}
gcc_parallel_test_enable 0
+# GCC breaks up --help output into lines at most $COLUMNS characters
+# wide (or 80 when COLUMNS is not defined), set the COLUMNS environment
+# variable to a value large enough to prevent this (and restore it when
+# done).
+global env
+
+if [ info exists env(COLUMNS) ] {
+ set prev_columns $env(COLUMNS)
+}
+
+set env(COLUMNS) 1024
+
# Document --version. Ideally, there should be no undocumented switches
# in --help.
check_for_options c "--help" "--version" "This option lacks documentation" ""
# Specify patterns (arguments 3 and later) that match option names
# at the beginning of the line and not when they are referenced by
# some other options later on.
-# The (?w) Tcl embedded option tells the Tcl regexp parser to treat
-# the '^' character as an anchor.
check_for_options c "--help=joined" \
- "(?w)^ *-Wformat=" "(?w)^ *-fstrict-prototype" ""
+ "^ +-Wformat=" "^ +-fstrict-prototype" ""
check_for_options c "--help=separate" \
- "(?w)^ *-MF" "(?w)^ *-fstrict-prototype" ""
+ "^ +-MF" "^ +-fstrict-prototype" ""
check_for_options c "--help=warnings,joined" \
- "(?w)^ *-Wformat=" "(?w)^ *-Wtrigraphs" ""
+ "^ +-Wformat=" "^ +-Wtrigraphs" ""
check_for_options c "--help=warnings,^joined" \
- "(?w)^ *-Wtrigraphs" "(?w)^ *-Wformat=" ""
+ "^ +-Wtrigraphs" "^ +-Wformat=" ""
check_for_options c "--help=joined,separate" \
- "(?w)^ *-I" "" ""
+ "^ +-I" "" ""
check_for_options c "--help=^joined,separate" \
- "(?w)^ *--param " "" ""
+ "^ +--param " "" ""
check_for_options c "--help=joined,^separate" \
- "(?w)^ *--help=" "" ""
+ "^ +--help=" "" ""
check_for_options c "--help=joined,undocumented" "" "" ""
+# Check to make sure the description for every option is a complete
+# sentence ending in a period. This matters not just for consistency
+# but also because other sentences may be appended to it by the help
+# subsystem. Do this one help class at a time to make it easier to
+# find the source a failure.
+
+foreach cls { "ada" "c" "c++" "fortran" "go" \
+ "optimizers" "param" "target" "warnings" } {
+
+ check_for_options c "--help=$cls" "" "^ +-.*\[^:.\]$" ""
+}
+
# Listing only excludes gives empty results.
check_for_options c "--help=^joined,^separate" "" "" ""
+if [ info exists prev_columns ] {
+ # Reset the enviroment variable to its oriuginal value.
+ set env(COLUMNS) $prev_columns
+} else {
+ # Remove the variable from the environment if it didn't exist
+ # to begin with to avoid affecting subsequent tests.
+ array unset env COLUMNS
+}
+
gcc_parallel_test_enable 1
# Verify that COMPILER_PATTERRNS appear in gcc output.
foreach pattern [split $compiler_patterns "\n"] {
if {$pattern != ""} {
- if {[regexp -- "$pattern" $gcc_output]} {
+ if {[regexp -line -- "$pattern" $gcc_output]} {
pass "$test $pattern"
} else {
if {$expected_failure != ""} {
# Verify that COMPILER_NON_PATTERRNS do not appear in gcc output.
foreach pattern [split $compiler_non_patterns "\n"] {
if {$pattern != ""} {
- if {![regexp -- "$pattern" $gcc_output]} {
+ if {![regexp -line -- "$pattern" $gcc_output result]} {
pass "$test $pattern"
} else {
if {$expected_failure != ""} {
xfail "$test \"$pattern\" absent from output"
} else {
- fail "$test \"$pattern\" absent from output"
+ # Print the unexpected line that caused the failure
+ # to make it easier to find in the multiline output.
+ fail "$test \"$pattern\" absent from output: \"$result\""
}
}
}