This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: substring boundardy check (PR27588): writing a dg tests case


Hi,

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.


FX


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]