public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r13-6544] testsuite: Adjust powerpc ppc-fortran.exp to support dg-{warning, error}
@ 2023-03-08 7:00 Kewen Lin
0 siblings, 0 replies; only message in thread
From: Kewen Lin @ 2023-03-08 7:00 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:2a2a159f7bd9d929ce457937f669ed2dd6ebccec
commit r13-6544-g2a2a159f7bd9d929ce457937f669ed2dd6ebccec
Author: Kewen Lin <linkw@linux.ibm.com>
Date: Wed Mar 8 00:57:21 2023 -0600
testsuite: Adjust powerpc ppc-fortran.exp to support dg-{warning,error}
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.
[1] https://gcc.gnu.org/pipermail/gcc-patches/2023-March/613302.html
gcc/testsuite/ChangeLog:
* gcc.target/powerpc/ppc-fortran/ppc-fortran.exp: Override
gcc_{warning,error}_prefix with Fortran specific one used in
gfortran_init.
Diff:
---
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-03-08 7:00 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-08 7:00 [gcc r13-6544] testsuite: Adjust powerpc ppc-fortran.exp to support dg-{warning, error} Kewen Lin
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).