public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Kewen.Lin" <linkw@linux.ibm.com>
To: Alexandre Oliva <oliva@adacore.com>
Cc: Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>,
	Mike Stump <mikestump@comcast.net>,
	David Edelsohn <dje.gcc@gmail.com>,
	Segher Boessenkool <segher@kernel.crashing.org>,
	Kewen Lin <linkw@gcc.gnu.org>,
	gcc-patches@gcc.gnu.org
Subject: Re: [PATCH] [testsuite] [ppc] skip ppc-fortran if fortran is disabled
Date: Thu, 6 Apr 2023 16:32:50 +0800	[thread overview]
Message-ID: <8bff130a-d872-1110-3f64-a236bcf72508@linux.ibm.com> (raw)
In-Reply-To: <orv8i98rdn.fsf@lxoliva.fsfla.org>

Hi Alexandre,

on 2023/4/6 14:19, Alexandre Oliva wrote:
> 
> Skip ppc-fortran.exp if a trivial fortran program cannot be compiled.
> 

IIUC, without this patch and under the configuration disabling fortran,
all the cases in this sub-testsuite would fail?  Thanks for fixing!

> Regstrapped on x86_64-linux-gnu and ppc64-linux-gnu.  Also tested on
> ppc64-vx7r2 with gcc-12, with the Fortran language disabled.  Ok to
> install?
> 
> 
> for  gcc/testsuite/ChangeLog
> 
> 	* gcc.target/powerpc/ppc-fortran/ppc-fortran.exp: Test for
> 	fortran compiler, skip if missing.
> ---
>  .../gcc.target/powerpc/ppc-fortran/ppc-fortran.exp |    9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/gcc/testsuite/gcc.target/powerpc/ppc-fortran/ppc-fortran.exp b/gcc/testsuite/gcc.target/powerpc/ppc-fortran/ppc-fortran.exp
> index f7e99ac848753..d05c27ab589a7 100644
> --- a/gcc/testsuite/gcc.target/powerpc/ppc-fortran/ppc-fortran.exp
> +++ b/gcc/testsuite/gcc.target/powerpc/ppc-fortran/ppc-fortran.exp
> @@ -33,6 +33,15 @@ if ![info exists DEFAULT_FFLAGS] then {
>  # Initialize `dg'.
>  dg-init
> 
> +if { ![check_no_compiler_messages fortran_available assembly {
> +! Fortran
> +program P
> +  stop
> +end program P
> +} ""] } {
> +    return
> +}
> +

super nit: this check only needs proc check_no_compiler_messages,
can it be moved a bit upward just after line "load_lib gfortran-dg.exp"
then it can skip more unnecessary codes?

OK with this nit fixed (if you agree).  Thanks!

BR,
Kewen



  reply	other threads:[~2023-04-06  8:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-06  6:19 Alexandre Oliva
2023-04-06  8:32 ` Kewen.Lin [this message]
2023-04-07  3:41   ` Alexandre Oliva

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=8bff130a-d872-1110-3f64-a236bcf72508@linux.ibm.com \
    --to=linkw@linux.ibm.com \
    --cc=dje.gcc@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=linkw@gcc.gnu.org \
    --cc=mikestump@comcast.net \
    --cc=oliva@adacore.com \
    --cc=ro@CeBiTec.Uni-Bielefeld.DE \
    --cc=segher@kernel.crashing.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).