public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Richard Bunt <richard.bunt@linaro.org>
To: gdb-patches@sourceware.org
Cc: Richard Bunt <richard.bunt@linaro.org>,
	Luis Machado <luis.machado@arm.com>, Tom Tromey <tom@tromey.com>
Subject: [PATCH v2] gdb/testsuite: Testing with the armflang compiler
Date: Mon, 12 Jun 2023 09:27:14 +0100	[thread overview]
Message-ID: <20230612082714.607692-1-richard.bunt@linaro.org> (raw)

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 <luis.machado@arm.com>
Approved-By: Tom Tromey <tom@tromey.com>
---
 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


             reply	other threads:[~2023-06-12  8:28 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-12  8:27 Richard Bunt [this message]
2023-06-12 18:33 ` Tom Tromey
2023-06-13  8:49   ` Richard Bunt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230612082714.607692-1-richard.bunt@linaro.org \
    --to=richard.bunt@linaro.org \
    --cc=gdb-patches@sourceware.org \
    --cc=luis.machado@arm.com \
    --cc=tom@tromey.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).