This is the mail archive of the
mailing list for the GNU Fortran project.
Re: substring boundardy check (PR27588): writing a dg tests case
- From: FX Coudert <fxcoudert at gmail dot com>
- To: Tobias Burnus <burnus at net-b dot de>
- Cc: fortran at gcc dot gnu dot org
- Date: Wed, 4 Oct 2006 00:16:49 +0200
- Subject: Re: substring boundardy check (PR27588): writing a dg tests case
- References: <4522D5E8.email@example.com>
First, thanks for taking care of this!
a) Are there any pre-review comments to the following patch? It
currently writes such error messages:
Fortran runtime error: Substring out of bounds: lower bound less than
one (in file 'string2.f90', at line 5)
Fortran runtime error: Substring out of bounds: upper bound exceeds
string length (in file 'cbnd1.for', at line 5)
Is it ok like that?
Sounds OK, but I'm not a native english speaker :)
b) I would like to add a test case to the test suit, but how does one
test for run-time errors?
Use dg-shouldfail and dg-output to check a) that the testcase fails
to execute and b) it issues a runtime message. See gfortran.dg/
bounds_check_fail_1.f90 for details.
If I have a solution for (b), I will submit a proper patch.
As I already said (but I think it was off-list), I promise to review
it quickly, as I already had a half-baked patch for that PR.