public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Tom de Vries <tdevries@suse.de>
To: gdb-patches@sourceware.org
Subject: [committed][gdb/testsuite] Workaround unnecessary .s file with gfortran 4.8
Date: Tue, 28 Jun 2022 17:11:26 +0200	[thread overview]
Message-ID: <d7e4a7c0-eff0-f9cb-b32a-20f9f8b0ed10@suse.de> (raw)
In-Reply-To: <20220610071129.GA16220@delia.home>

On 6/10/22 09:11, Tom de Vries wrote:
> Hi,
> 
> After running test-case gdb.fortran/namelist.exp with gfortran 4.8.5, I'm left
> with:
> ...
> $ git sti
> On branch master
> Your branch is up to date with 'origin/master'.
> 
> Untracked files:
>    (use "git add <file>..." to include in what will be committed)
>          gdb/testsuite/lib/compiler.s
> 
> nothing added to commit but untracked files present (use "git add" to track)
> ...
> 
> We're running into PR gcc/60447, which was fixed in gcc 4.9.0.
> 
> Workaround this by first copying the source file to the temp dir, such that
> the .s file is left there instead:
> ...
> $ ls build/gdb/testsuite/temp/<runtest pid>/
> compiler.c  compiler.F90  compiler.s
> ...
> 
> Tested on x86_64-linux.
> 
> Any comments?

Committed.

Thanks,
- Tom

> [gdb/testsuite] Workaround unnecessary .s file with gfortran 4.8
> 
> ---
>   gdb/testsuite/lib/gdb.exp | 6 ++++++
>   1 file changed, 6 insertions(+)
> 
> diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
> index 41e1d549510..d1a4f3720c7 100644
> --- a/gdb/testsuite/lib/gdb.exp
> +++ b/gdb/testsuite/lib/gdb.exp
> @@ -4139,6 +4139,12 @@ proc get_compiler_info {{language "c"}} {
>   	set cppout [read $file]
>   	close $file
>       } else {
> +	# Copy $ifile to temp dir, to work around PR gcc/60447.  This will leave the
> +	# superfluous .s file in the temp dir instead of in the source dir.
> +	set tofile [file tail $ifile]
> +	set tofile [standard_temp_file $tofile]
> +	file copy -force $ifile $tofile
> +	set ifile $tofile
>   	set cppout [ gdb_compile "${ifile}" "" preprocess [list "$language" quiet getting_compiler_info] ]
>       }
>       eval log_file $saved_log

      reply	other threads:[~2022-06-28 15:11 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-10  7:11 [PATCH][gdb/testsuite] " Tom de Vries
2022-06-28 15:11 ` Tom de Vries [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d7e4a7c0-eff0-f9cb-b32a-20f9f8b0ed10@suse.de \
    --to=tdevries@suse.de \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).