From: HAO CHEN GUI <guihaoc@linux.ibm.com>
To: "Kewen.Lin" <linkw@linux.ibm.com>, GCC Patches <gcc-patches@gcc.gnu.org>
Cc: Segher Boessenkool <segher@kernel.crashing.org>,
David Edelsohn <dje.gcc@gmail.com>,
Peter Bergner <bergner@linux.ibm.com>
Subject: Re: [PATCH] testsuite, rs6000: Adjust ppc-fortran.exp to support dg-{warning,error}
Date: Fri, 10 Mar 2023 16:36:16 +0800 [thread overview]
Message-ID: <41eee65f-efae-bb01-8dcb-2bce81f76f6f@linux.ibm.com> (raw)
In-Reply-To: <60621672-5c9e-ddb3-51fa-5565d678899c@linux.ibm.com>
Hi Kewen,
I tested it with my fortran test case. It works. Thanks a lot.
Gui Haochen
在 2023/3/6 17:27, Kewen.Lin 写道:
> Hi,
>
> According to Haochen's finding in [1], currently ppc-fortran.exp
> doesn't support Fortran specific warning or error messages well.
> By looking into it, it's due to that gfortran uses some different
> warning/error prefixes as follows:
>
> set gcc_warning_prefix "\[Ww\]arning:"
> set gcc_error_prefix "(Fatal )?\[Ee\]rror:"
>
> comparing to:
>
> set gcc_warning_prefix "warning:"
> set gcc_error_prefix "(fatal )?error:"
>
> So this is to override these two prefixes and make it support
> dg-{warning,error} checks.
>
> Tested on powerpc64-linux-gnu P7/P8/P9 and
> powerpc64le-linux-gnu P9/P10.
>
> [1] https://gcc.gnu.org/pipermail/gcc-patches/2023-March/613302.html
>
> BR,
> Kewen
> -----
>
> gcc/testsuite/ChangeLog:
>
> * gcc.target/powerpc/ppc-fortran/ppc-fortran.exp: Override
> gcc_{warning,error}_prefix with Fortran specific one used in
> gfortran_init.
> ---
> gcc/testsuite/gcc.target/powerpc/ppc-fortran/ppc-fortran.exp | 5 +++++
> 1 file changed, 5 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 a556d7b48a3..f7e99ac8487 100644
> --- a/gcc/testsuite/gcc.target/powerpc/ppc-fortran/ppc-fortran.exp
> +++ b/gcc/testsuite/gcc.target/powerpc/ppc-fortran/ppc-fortran.exp
> @@ -58,6 +58,11 @@ proc dg-compile-aux-modules { args } {
> }
> }
>
> +# Override gcc_{warning,error}_prefix with Fortran specific prefixes used
> +# in gfortran_init to support dg-{warning,error} checks.
> +set gcc_warning_prefix "\[Ww\]arning:"
> +set gcc_error_prefix "(Fatal )?\[Ee\]rror:"
> +
> # Main loop.
> gfortran-dg-runtest [lsort \
> [glob -nocomplain $srcdir/$subdir/*.\[fF\]{,90,95,03,08} ] ] "" $DEFAULT_FFLAGS
> --
> 2.39.1
prev parent reply other threads:[~2023-03-10 8:36 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-06 9:27 Kewen.Lin
2023-03-10 8:36 ` HAO CHEN GUI [this message]
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=41eee65f-efae-bb01-8dcb-2bce81f76f6f@linux.ibm.com \
--to=guihaoc@linux.ibm.com \
--cc=bergner@linux.ibm.com \
--cc=dje.gcc@gmail.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=linkw@linux.ibm.com \
--cc=segher@kernel.crashing.org \
/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).