From patchwork Thu Apr 6 06:19:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandre Oliva X-Patchwork-Id: 67439 Return-Path: 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 ; 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 , Mike Stump , David Edelsohn , Segher Boessenkool , Kewen Lin 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: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Alexandre Oliva via Gcc-patches From: Alexandre Oliva Reply-To: Alexandre Oliva Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" 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(+) 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