This patch fixes an annoying problem of the dg-final test using the scan-assembler family of tests (and maybe others). For a test file, the option "-ffat-lto-objects" is added to the command line once for each "scan-assembler" test, eventually resulting in an unreadable command line.
Can this be committed? Ciao Dominik ^_^ ^_^ -- Dominik Vogt IBM Germany
gcc/testsuite/ChangeLog * lib/gcc-dg.exp: Add extra options for db-final to the command line only once.
>From e89aecf367ffd2e89ac6eec7a04edd2eddd2a0da Mon Sep 17 00:00:00 2001 From: Dominik Vogt <v...@linux.vnet.ibm.com> Date: Thu, 20 Aug 2015 10:26:17 +0100 Subject: [PATCH] Add extra compile options for dg-final only once. A file with many scan-assembler* tests used to add -ffat-lto-objects to the command line many times, eventually rendering it unreadable. --- gcc/testsuite/lib/gcc-dg.exp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/testsuite/lib/gcc-dg.exp b/gcc/testsuite/lib/gcc-dg.exp index 7ce71df..7c1ab85 100644 --- a/gcc/testsuite/lib/gcc-dg.exp +++ b/gcc/testsuite/lib/gcc-dg.exp @@ -270,7 +270,7 @@ proc gcc-dg-test-1 { target_compile prog do_what extra_tool_flags } { set finalcmd [lindex $x 0] if { [info procs ${finalcmd}_required_options] != "" } { set req [${finalcmd}_required_options] - if { $req != "" } { + if { $req != "" && [lsearch -exact $extra_tool_flags $req] == -1 } { lappend extra_tool_flags $req } } -- 2.3.0