public inbox for
 help / color / mirror / Atom feed
From: Alexandre Oliva <>
To: "Kewen.Lin" <>
Cc: Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>,
	Mike Stump <>,
	David Edelsohn <>,
	Segher Boessenkool <>,
	Kewen Lin <>,
Subject: Re: [PATCH] [testsuite] [ppc] skip ppc-fortran if fortran is disabled
Date: Fri, 07 Apr 2023 00:41:46 -0300	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <> (Kewen Lin's message of "Thu, 6 Apr 2023 16:32:50 +0800")

Hello, Kewen,

On Apr  6, 2023, "Kewen.Lin" <> wrote:

> 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!


> 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?

I wasn't sure, so I'd put it after supporting code.  Turns out it can.
Here's what I've just finished retesting, and am thus checking in.

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

[testsuite] [ppc] skip ppc-fortran if fortran is disabled

Skip ppc-fortran.exp if a trivial fortran program cannot be compiled.

for  gcc/testsuite/ChangeLog

	* Test for
	fortran compiler, skip if missing.
 .../ |   10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/gcc/testsuite/ b/gcc/testsuite/
index f7e99ac848753..f7b7c05487cda 100644
--- a/gcc/testsuite/
+++ b/gcc/testsuite/
@@ -21,6 +21,16 @@ if { ![istarget powerpc*-*-*] && ![istarget rs6000-*-*] } then {
+# Make sure there is a fortran compiler to test.
+if { ![check_no_compiler_messages fortran_available assembly {
+! Fortran
+program P
+  stop
+end program P
+} ""] } {
+    return
 # Load support procs.
 load_lib gfortran-dg.exp

Alexandre Oliva, happy hacker      
   Free Software Activist                       GNU Toolchain Engineer
Disinformation flourishes because many people care deeply about injustice
but very few check the facts.  Ask me about <>

      reply	other threads:[~2023-04-07  3:42 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
2023-04-07  3:41   ` Alexandre Oliva [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:

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

  git send-email \ \ \ \ \ \ \ \
    --cc=ro@CeBiTec.Uni-Bielefeld.DE \ \

* 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).