diff mbox series

testsuite: Fix gcc.target/arm/multilib.exp use of gcc_opts

Message ID CAKdteOY1k8eAktKXP_-NgYF2oF6rgSF2ZzM2MCg1QvnNwSu5zg@mail.gmail.com
State New
Headers show
Series testsuite: Fix gcc.target/arm/multilib.exp use of gcc_opts | expand

Commit Message

Christophe Lyon Aug. 11, 2020, 1:02 p.m. UTC
This patch fixes an incorrect parameter passing for $gcc_opts, which
produces a DejaGnu error: (DejaGnu) proc "gcc_opts" does not exist.

2020-08-11  Christophe Lyon  <christophe.lyon@linaro.org>

        gcc/testsuite/
        * gcc.target/arm/multilib.exp: Fix parameter passing for gcc_opts.

     if { [string match "$multi_dir\n" $gcc_output] } {
        pass "multilibdir $gcc_opts $multi_dir"
testsuite: Fix gcc.target/arm/multilib.exp use of gcc_opts

This patch fixes an incorrect parameter passing for $gcc_opts, which
produces a DejaGnu error: (DejaGnu) proc "gcc_opts" does not exist.

2020-08-11  Christophe Lyon  <christophe.lyon@linaro.org>

	gcc/testsuite/
	* gcc.target/arm/multilib.exp: Fix parameter passing for gcc_opts.

diff --git a/gcc/testsuite/gcc.target/arm/multilib.exp b/gcc/testsuite/gcc.target/arm/multilib.exp
index f67a92a..c5f3c02 100644
--- a/gcc/testsuite/gcc.target/arm/multilib.exp
+++ b/gcc/testsuite/gcc.target/arm/multilib.exp
@@ -40,7 +40,7 @@ proc multilib_config {profile} {
 proc check_multi_dir { gcc_opts multi_dir } {
     global tool
 
-    set options [list "additional_flags=[concat "--print-multi-directory" [gcc_opts]]"]
+    set options [list "additional_flags=[concat "--print-multi-directory" $gcc_opts]"]
     set gcc_output [${tool}_target_compile "" "" "none" $options]
     if { [string match "$multi_dir\n" $gcc_output] } {
 	pass "multilibdir $gcc_opts $multi_dir"

Comments

Richard Sandiford Aug. 11, 2020, 4:40 p.m. UTC | #1
Christophe Lyon via Gcc-patches <gcc-patches@gcc.gnu.org> writes:
> This patch fixes an incorrect parameter passing for $gcc_opts, which
> produces a DejaGnu error: (DejaGnu) proc "gcc_opts" does not exist.

Huh, wonder how that went unnoticed for so long…

> 2020-08-11  Christophe Lyon  <christophe.lyon@linaro.org>
>
>         gcc/testsuite/
>         * gcc.target/arm/multilib.exp: Fix parameter passing for gcc_opts.

OK everywhere that needs it, thanks.

Richard

> diff --git a/gcc/testsuite/gcc.target/arm/multilib.exp b/gcc/testsuite/gcc.target/arm/multilib.exp
> index f67a92a..c5f3c02 100644
> --- a/gcc/testsuite/gcc.target/arm/multilib.exp
> +++ b/gcc/testsuite/gcc.target/arm/multilib.exp
> @@ -40,7 +40,7 @@ proc multilib_config {profile} {
>  proc check_multi_dir { gcc_opts multi_dir } {
>      global tool
>  
> -    set options [list "additional_flags=[concat "--print-multi-directory" [gcc_opts]]"]
> +    set options [list "additional_flags=[concat "--print-multi-directory" $gcc_opts]"]
>      set gcc_output [${tool}_target_compile "" "" "none" $options]
>      if { [string match "$multi_dir\n" $gcc_output] } {
>  	pass "multilibdir $gcc_opts $multi_dir"
Christophe Lyon Aug. 12, 2020, 9:20 a.m. UTC | #2
On Tue, 11 Aug 2020 at 18:40, Richard Sandiford
<richard.sandiford@arm.com> wrote:
>
> Christophe Lyon via Gcc-patches <gcc-patches@gcc.gnu.org> writes:
> > This patch fixes an incorrect parameter passing for $gcc_opts, which
> > produces a DejaGnu error: (DejaGnu) proc "gcc_opts" does not exist.
>
> Huh, wonder how that went unnoticed for so long…

Me too... it was introduced on 2020-02-06 by r10-6475

>
> > 2020-08-11  Christophe Lyon  <christophe.lyon@linaro.org>
> >
> >         gcc/testsuite/
> >         * gcc.target/arm/multilib.exp: Fix parameter passing for gcc_opts.
>
> OK everywhere that needs it, thanks.

So pushed to gcc-10 too.

Thanks,

Christophe

>
> Richard
>
> > diff --git a/gcc/testsuite/gcc.target/arm/multilib.exp b/gcc/testsuite/gcc.target/arm/multilib.exp
> > index f67a92a..c5f3c02 100644
> > --- a/gcc/testsuite/gcc.target/arm/multilib.exp
> > +++ b/gcc/testsuite/gcc.target/arm/multilib.exp
> > @@ -40,7 +40,7 @@ proc multilib_config {profile} {
> >  proc check_multi_dir { gcc_opts multi_dir } {
> >      global tool
> >
> > -    set options [list "additional_flags=[concat "--print-multi-directory" [gcc_opts]]"]
> > +    set options [list "additional_flags=[concat "--print-multi-directory" $gcc_opts]"]
> >      set gcc_output [${tool}_target_compile "" "" "none" $options]
> >      if { [string match "$multi_dir\n" $gcc_output] } {
> >       pass "multilibdir $gcc_opts $multi_dir"
diff mbox series

Patch

diff --git a/gcc/testsuite/gcc.target/arm/multilib.exp
b/gcc/testsuite/gcc.target/arm/multilib.exp
index f67a92a..c5f3c02 100644
--- a/gcc/testsuite/gcc.target/arm/multilib.exp
+++ b/gcc/testsuite/gcc.target/arm/multilib.exp
@@ -40,7 +40,7 @@  proc multilib_config {profile} {
 proc check_multi_dir { gcc_opts multi_dir } {
     global tool

-    set options [list "additional_flags=[concat
"--print-multi-directory" [gcc_opts]]"]
+    set options [list "additional_flags=[concat
"--print-multi-directory" $gcc_opts]"]
     set gcc_output [${tool}_target_compile "" "" "none" $options]