From patchwork Fri Jun 9 10:16:05 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Bunt X-Patchwork-Id: 70818 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 065C33858C53 for ; Fri, 9 Jun 2023 10:16:42 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 065C33858C53 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1686305802; bh=ORhgtPSiPwe1NEYoZEQGkIeakkiMzLaicXANzhOfZGk=; h=To:Cc:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=wGTpBNTmHG4bAkVg92SRzYGB3PmlrXcQRs5fTuXGkxp32z9SZMwNg3G/JArNmX+Zv jZ0KvNpnyTFvQqB5IrUjFu4/8BNT4AlKXnskDNq+eGn4yKrndpst5Dbm3vn+zqGOx2 4asceBSL6ty4fnpMuy5kVNODAw7jpiibmVgp4P3M= X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from mail-wm1-x32a.google.com (mail-wm1-x32a.google.com [IPv6:2a00:1450:4864:20::32a]) by sourceware.org (Postfix) with ESMTPS id 6AD193858D35 for ; Fri, 9 Jun 2023 10:16:16 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 6AD193858D35 Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-3f7e7fc9fe6so15343435e9.3 for ; Fri, 09 Jun 2023 03:16:16 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686305775; x=1688897775; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=ORhgtPSiPwe1NEYoZEQGkIeakkiMzLaicXANzhOfZGk=; b=fnf+xPqHS4JnIyE3vs3Kmqe7aPrZNGFtaaWx6e+5G7MVZqcK7EAAV2mHEUnWVJQUGP sPpypXlgY0bjtsvyROjchXqB41j2mbHU0RNqvCvY526eia2xYu1BxgvaFM7fDgvVg7v1 WF9+CYEZdlCUa9f4BA4Kj1GyZlHa9IdZfDFywruUV2mMHn5DVMIp9Y8ntHGh26YXY7Pw +tKczEJOhB/wL7Wk5yrviRqdytHmFTyIvC6FGzYcSgPwLUKozvo6BZW/fiWeBPMohvdd 5XtBe3BKRu67d34NwYOS+U/pEQ6BPc+DFSxVAxaFnMWoZoSZRjiVT2JCMFflwCNZNrjb qG5A== X-Gm-Message-State: AC+VfDzhj7GflE5IVk2gN0HuTdIPR3tF5SxmezO9c5V5i0KN6+UiiIof Tr7AfCZLk4nTyeZVs0phxfO9S3/O7snLwL3Ro1s= X-Google-Smtp-Source: ACHHUZ5dln2GG7PuFsjd9rEcWwfSIodUkP1h4mie7YqO7A1LTNdVQbvXvjodCF+d+9YF9+yX2yM89A== X-Received: by 2002:a05:600c:2181:b0:3f7:f446:927 with SMTP id e1-20020a05600c218100b003f7f4460927mr778661wme.37.1686305774698; Fri, 09 Jun 2023 03:16:14 -0700 (PDT) Received: from whitegate.home ([2a00:23c4:9603:7f01:8799:ffd2:e148:539d]) by smtp.gmail.com with ESMTPSA id 8-20020a05600c230800b003f7ed9dae70sm2275199wmo.0.2023.06.09.03.16.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Jun 2023 03:16:14 -0700 (PDT) To: gdb-patches@sourceware.org Cc: Richard Bunt Subject: [PATCH] gdb/testsuite: Testing with the armflang compiler Date: Fri, 9 Jun 2023 11:16:05 +0100 Message-Id: <20230609101605.545246-1-richard.bunt@linaro.org> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 X-Spam-Status: No, score=-11.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE 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: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Richard Bunt via Gdb-patches From: Richard Bunt Reply-To: Richard Bunt Errors-To: gdb-patches-bounces+patchwork=sourceware.org@sourceware.org Sender: "Gdb-patches" Currently the Fortran test suite does not run with armflang because the compiler detection fails. This in turn means fortran_runto_main does not know which main method to use to start a test case. Fortran compiler detection was added in 44d469c5f85; however, the commit message notes that it was not tested with armflang. This commit tests and fixes up a minor issue to get the detection working. The goal here is to get the tests running and preventing further regressions during future work. This change does not do anything to fix existing failures. From what I can understand, the auto detection leverages the preprocessor to extract the Fortran compiler identity from the defines. This preprocessor output is then evaluated by the test suite to import these defines. In the case of armflang, this evaluation step is disrupted by the presence of the following warning: $ armflang -E -fdiagnostics-color=never testsuite/lib/compiler.F90 -o compiler.exp $ clang-13: warning: argument unused during compilation: '-fdiagnostics-color=never' [-Wunused-command-line-argument] The evaluation logic is already set up to filter this warning, but the prefix differs. This commit fixes the issue by updating the filter to exclude the armflang flavour of warning. gdb.fortran regression tests run with GNU, Intel and Intel LLVM. No regressions detected. The gdb.fortran test results with ACfL 23.04.1 are as follows. Before: # of expected passes 560 # of unexpected failures 113 # of unresolved testcases 2 # of untested testcases 5 # of duplicate test names 2 After: # of expected passes 5388 # of unexpected failures 628 # of known failures 10 # of untested testcases 8 # of unsupported tests 5 # of duplicate test names 5 As can be seen from the above, there are now considerably more passing assertions. Reviewed-By: Luis Machado --- gdb/testsuite/lib/gdb.exp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index 220640210cd..b1d5ef3fef1 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -4531,7 +4531,7 @@ proc get_compiler_info {{language "c"}} { # eval this line verbose "get_compiler_info: $cppline" 2 eval "$cppline" - } elseif { [ regexp "flang.*warning.*'-fdiagnostics-color=never'" "$cppline"] } { + } elseif { [ regexp "\[fc\]lang.*warning.*'-fdiagnostics-color=never'" "$cppline"] } { # Both flang preprocessors (llvm flang and classic flang) print a # warning for the unused -fdiagnostics-color=never, so we skip this # output line here.