Message ID | orv8i98rdn.fsf@lxoliva.fsfla.org |
---|---|
State | New |
Headers |
Return-Path: <gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org> X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 438353858C50 for <patchwork@sourceware.org>; Thu, 6 Apr 2023 06:20:03 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 438353858C50 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1680762003; bh=ddhvjxVpdTXGQUIW9tate6jX0LchPep7kCoK37S8JGc=; h=To:Cc:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=V4ArPnXd+e6O+OEnJFTFCGqoBwzhi0IHbm9bXWGncto7VpZPGnFWmOLwOUbGgD2zs F2r5S8EpB74IC/0csd1HXnlSARtN07zjNQBJmG6J3wv8w2SiEvpO3nQqRDoOjiNM4U 1T02ukPocKXekVgLzSbp5+aJHcnsl8vlA/wMFwhM= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from rock.gnat.com (rock.gnat.com [IPv6:2620:20:4000:0:a9e:1ff:fe9b:1d1]) by sourceware.org (Postfix) with ESMTPS id 3002B3858D39; Thu, 6 Apr 2023 06:19:34 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 3002B3858D39 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id F3375116720; Thu, 6 Apr 2023 02:19:33 -0400 (EDT) X-Virus-Scanned: Debian amavisd-new at gnat.com Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id l8QOddXkU+Ad; Thu, 6 Apr 2023 02:19:33 -0400 (EDT) Received: from free.home (tron.gnat.com [IPv6:2620:20:4000:0:46a8:42ff:fe0e:e294]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by rock.gnat.com (Postfix) with ESMTPS id 8B0F4116708; Thu, 6 Apr 2023 02:19:33 -0400 (EDT) Received: from livre (livre.home [172.31.160.2]) by free.home (8.15.2/8.15.2) with ESMTPS id 3366JGhI1768825 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Thu, 6 Apr 2023 03:19:16 -0300 To: gcc-patches@gcc.gnu.org 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> Subject: [PATCH] [testsuite] [ppc] skip ppc-fortran if fortran is disabled Organization: Free thinker, does not speak for AdaCore Date: Thu, 06 Apr 2023 03:19:16 -0300 Message-ID: <orv8i98rdn.fsf@lxoliva.fsfla.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Scanned-By: MIMEDefang 2.84 X-Spam-Status: No, score=-12.3 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, KAM_SHORT, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list <gcc-patches.gcc.gnu.org> List-Unsubscribe: <https://gcc.gnu.org/mailman/options/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe> List-Archive: <https://gcc.gnu.org/pipermail/gcc-patches/> List-Post: <mailto:gcc-patches@gcc.gnu.org> List-Help: <mailto:gcc-patches-request@gcc.gnu.org?subject=help> List-Subscribe: <https://gcc.gnu.org/mailman/listinfo/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe> From: Alexandre Oliva via Gcc-patches <gcc-patches@gcc.gnu.org> Reply-To: Alexandre Oliva <oliva@adacore.com> Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" <gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org> |
Series |
[testsuite,ppc] skip ppc-fortran if fortran is disabled
|
|
Commit Message
Alexandre Oliva
April 6, 2023, 6:19 a.m. UTC
Skip ppc-fortran.exp if a trivial fortran program cannot be compiled. 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(+)
Comments
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
Hello, Kewen, On Apr 6, 2023, "Kewen.Lin" <linkw@linux.ibm.com> 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! Yup > 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. Thanks, > 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 * gcc.target/powerpc/ppc-fortran/ppc-fortran.exp: Test for fortran compiler, skip if missing. --- .../gcc.target/powerpc/ppc-fortran/ppc-fortran.exp | 10 ++++++++++ 1 file changed, 10 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..f7b7c05487cda 100644 --- a/gcc/testsuite/gcc.target/powerpc/ppc-fortran/ppc-fortran.exp +++ b/gcc/testsuite/gcc.target/powerpc/ppc-fortran/ppc-fortran.exp @@ -21,6 +21,16 @@ if { ![istarget powerpc*-*-*] && ![istarget rs6000-*-*] } then { return } +# 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
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 +} + global gfortran_test_path global gfortran_aux_module_flags set gfortran_test_path $srcdir/$subdir