From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-x436.google.com (mail-wr1-x436.google.com [IPv6:2a00:1450:4864:20::436]) by sourceware.org (Postfix) with ESMTPS id 17A843858D32 for ; Mon, 12 Jun 2023 08:28:05 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 17A843858D32 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-x436.google.com with SMTP id ffacd0b85a97d-30fc1514745so675487f8f.2 for ; Mon, 12 Jun 2023 01:28:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1686558483; x=1689150483; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=MKK7zulrIEpQ4Cq2WohRQDZLfP1vaD6Cbk62EkN5c+4=; b=rfxmXclh60ZG/BDH3HAuOwrD51pmnQ07mGN/N+O7+XMKqiAHsJQwpB9tjmkv6oRAMW tygELTX6AggmYEjgNvTWwjlY3RKx9uMYi0wHvktObYuo4e4zAwKINgdb+Vd6yjt1XPiG tOdAEpXhuR+HbYcmb3PXCWI07BXoxux6WZl364NozDeKSSUN0PkxurIbs7LEu+CVYrL0 Qn80hf9lEjQeZsPkMxt3v2KKrdfxdFukmCCBUryAuFASi/5LtzkivPqUyNnU/4ydLKNi V7FicKwBPKQxTH5Qc0kXSXSVzKjVchvi7WlQ8naaWhjP257uZuDvRaC0CGAYceCAcPFq XxWw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686558483; x=1689150483; 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=MKK7zulrIEpQ4Cq2WohRQDZLfP1vaD6Cbk62EkN5c+4=; b=eYKf37vwFHk3nv6BlG9uGRCfL+C1C1AmlKIBxDFflMd7FeU0F3KZEAv4Tete+xqOYq bmAMkhqsGM0i1Ban0Pis/uIa17Qch/BLHrxK/ZOznlaZEZC8A7XBJsqi0XDxrQKE5HGy 2zeOE8TQyz2OvOC9dvAkGvWx9a2sERsvEDEItgBJevKr1kdAyVD9vcs1AlcIk6hmbuG0 D7wJdLhsnus9IQZe7Tjlar/wV+6ToEmJplHIpWYDXwRuU2jGsoGHUfLaK9Qfn/t485E2 lOBYGGeQ56/wMWn1DvTANeVqoJ6XrdJS12fyYTwooTrihe8Rfy+Nm3URuVaesdkM7kXY UD4w== X-Gm-Message-State: AC+VfDzv7gWa54GiGu4HXSOr8ngloyT/2QP6n7MXUWloQ8dda2IIX310 pmJbM/hf9rlkb1t2xMjXNDl/rWqsuj44/NWsnuU= X-Google-Smtp-Source: ACHHUZ7OuqwLxDPxXu+x+74DN0B2a3Pl8phxOy5//ScL9ifHEDU46P3g07/dWglsiAZzqcyZr4SAGw== X-Received: by 2002:adf:e28f:0:b0:30e:54e4:ce2c with SMTP id v15-20020adfe28f000000b0030e54e4ce2cmr4651375wri.57.1686558482669; Mon, 12 Jun 2023 01:28:02 -0700 (PDT) Received: from whitegate.home ([2a00:23c4:9603:7f01:72b3:1cf4:f5fe:c4e]) by smtp.gmail.com with ESMTPSA id i17-20020a5d6311000000b0030fae360f14sm6455214wru.68.2023.06.12.01.28.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Jun 2023 01:28:02 -0700 (PDT) From: Richard Bunt To: gdb-patches@sourceware.org Cc: Richard Bunt , Luis Machado , Tom Tromey Subject: [PATCH v2] gdb/testsuite: Testing with the armflang compiler Date: Mon, 12 Jun 2023 09:27:14 +0100 Message-Id: <20230612082714.607692-1-richard.bunt@linaro.org> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-12.2 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 List-Id: 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 Approved-By: Tom Tromey --- gdb/testsuite/lib/gdb.exp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index 3cdd73b7da3..c3e5d4891dc 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -4531,10 +4531,13 @@ 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. + # The armflang preprocessor has been observed to output the + # warning prefixed with "clang", so the regex also accepts + # this. } else { # unknown line verbose -log "get_compiler_info: $cppline" -- 2.32.0