Hi!

On Fri, May 13, 2016 at 07:09:30PM +0200, Dhole wrote:
> --- a/gcc/testsuite/lib/gcc-dg.exp
> +++ b/gcc/testsuite/lib/gcc-dg.exp
> @@ -451,6 +451,38 @@ proc restore-target-env-var { } {
>      }
>  }
>  
> +proc dg-set-compiler-env-var { args } {

I've noticed last night pr61861.c FAIL in i686-linux bootstrap,
easily reproduceable with short:
make check-gcc RUNTESTFLAGS='cpp.exp=source_date* dg.exp=pr61861.c'

The problem is that in cleanup-after-saved-dg-test, there are missing global
directives, so when it tests/uses the set_compiler_env_var and
saved_compiler_env_var vars to see if it should call
restore-compiler-env-var, it uses local (non-existing) vars instead and
never restores the env var.

Fixed thusly, bootstrapped/regtested on x86_64-linux and i686-linux, ok of
trunk?

2016-06-02  Jakub Jelinek  <ja...@redhat.com>

        * lib/gcc-dg.exp (cleanup-after-saved-dg-test): Add missing
        global set_compiler_env_var and global saved_compiler_env_var.

--- gcc/testsuite/lib/gcc-dg.exp.jj     2016-06-01 19:16:51.000000000 +0200
+++ gcc/testsuite/lib/gcc-dg.exp        2016-06-02 11:56:54.429137894 +0200
@@ -895,6 +895,8 @@ if { [info procs saved-dg-test] == [list
        global shouldfail
        global testname_with_flags
        global set_target_env_var
+       global set_compiler_env_var
+       global saved_compiler_env_var
        global keep_saved_temps_suffixes
        global multiline_expected_outputs
 


        Jakub

Reply via email to