From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-x429.google.com (mail-wr1-x429.google.com [IPv6:2a00:1450:4864:20::429]) by sourceware.org (Postfix) with ESMTPS id DB46B3858D35 for ; Fri, 9 Jun 2023 11:50:28 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org DB46B3858D35 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-wr1-x429.google.com with SMTP id ffacd0b85a97d-3094910b150so1720469f8f.0 for ; Fri, 09 Jun 2023 04:50:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1686311427; x=1688903427; h=content-transfer-encoding:in-reply-to:from:content-language :references:to:subject:user-agent:mime-version:date:message-id:from :to:cc:subject:date:message-id:reply-to; bh=wtj2h2pOUfSHXG7lpx0La85heudAMLrgDSIx5pv9llE=; b=ug0uydDQpAX7e7DAvhgiECazTVaD41rZfBLx/Xx/Mb248b3iXFPVNZi2Vz/Sk8r/Lb AxGackRYpj1V5jd+LMXgSx9Z1Aut9UIQS6oclBiXfLbxETdf3gubqgse/Wi2GQC4IppT EJq9KGyYCkyLHFw0J6oya0tIwoq1ymNRJA2zEORYwgWUlILCOPehLlZTSw0WQeO+Ad1J yOPocz0peVkHsIQBxEjIukBaxuQMDUwTmkmA/Ar5QLD83aRcyagZKZQJWh4SvvqqfpXL CgrBRIfzcIC1NH/7yLqwKQL4HUGDlBnYNvlNtdOms8IdF757OrF+4DIFJa4n2A3ZL1QD F0Tg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686311427; x=1688903427; h=content-transfer-encoding:in-reply-to:from:content-language :references:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=wtj2h2pOUfSHXG7lpx0La85heudAMLrgDSIx5pv9llE=; b=do5Zk0cGKsLYgIe+mEjfmh3jEhZ6wQQ08nzYoZ12HC8QZ9a7iW1OnxgFGGyTAe6XHb l2TX6ZYjY9POZ8+K36VWYMzcAxAb+uD3CGUk1Yul0SbROn4C0cTVUhRKogAriLVUkvXt 1Ye9Cfkm0WfZI7/u+Y34YMzVMO7950gO5qC7t66/YeBje3tBWBkSbbViP2EDADtY5ZH+ 6vuUMl/MC8GH6MBkLUm45yqclJlMSOdAIz+rg9UKTXOdtG9PdiDLfV/ah3SCFQ2rW59R mKQB45/EQfz+T93GMVMJyRGdgD22eNLyisqcgGtoDw86DtQX+PI6AOTZlFlF6SqaUBkf 9vkQ== X-Gm-Message-State: AC+VfDyeGpl3WKYkJTDKhSy4BPiRHymNLVk3+VYq4ld455ufH7t79pgI bJouAKDI+vp2zFoIsAhCSAkxVQ== X-Google-Smtp-Source: ACHHUZ4IvhUJi0pgFI3OIyg27ooeUmVY36dQ9upX8Ccq9q09EvFp/mL4HL/G7qGHSFx5INslSSplsg== X-Received: by 2002:a5d:6dd2:0:b0:30e:412a:8414 with SMTP id d18-20020a5d6dd2000000b0030e412a8414mr848795wrz.62.1686311427600; Fri, 09 Jun 2023 04:50:27 -0700 (PDT) Received: from ?IPV6:2a00:23c4:9603:7f01:8799:ffd2:e148:539d? ([2a00:23c4:9603:7f01:8799:ffd2:e148:539d]) by smtp.gmail.com with ESMTPSA id y3-20020a5d6203000000b003062c0ef959sm4264446wru.69.2023.06.09.04.50.26 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 09 Jun 2023 04:50:27 -0700 (PDT) Message-ID: <363ae76e-3699-6cec-56e5-ebe0571dd29d@linaro.org> Date: Fri, 9 Jun 2023 12:50:26 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Subject: Re: [PATCH] gdb/testsuite: Testing with the armflang compiler To: Luis Machado , gdb-patches@sourceware.org References: <20230609101605.545246-1-richard.bunt@linaro.org> Content-Language: en-US From: Richard Bunt In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-10.6 required=5.0 tests=BAYES_00,BODY_8BITS,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,NICE_REPLY_A,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 List-Id: On 09/06/2023 11:29, Luis Machado wrote: > On 6/9/23 11:16, Richard Bunt via Gdb-patches wrote: >> 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. >> >> --- >>   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. > > Is my understanding correct that this is now handling both flang and > clang? And clang is output for the armflang compiler? > That is correct. The regex has been extended to accept warnings prefixed with either "clang" or flang". This is because I observe the armflang preprocessor to emit warnings prefixed with clang. > It looks OK to me, but you might want to add an explanation, in a > comment, about why we're trying to handle clang for a fortran compiler. Agree, that is a little confusing without additional context. I plan to prepare a v2 with the following comment: # The armflang preprocessor has been observed to output the # warning prefixed with "clang", so the regex also accepts # this. > Reviewed-By: Luis Machado and the Reviewed-By tag. Thanks for the review! Rich