[Patch, Fortran+testsuite] PR 47750 - distinguish dg-error and dg-warning in Fortran

Tobias Burnus burnus@net-b.de
Tue Feb 15 14:24:00 GMT 2011


The attached patch fixes the long-standing problem that gfortran's 
testsuite does not distinguish between dg-error and dg-warning. This was 
fixed a couple of years ago for C but never for Fortran.

The issue was raised again in PR 45743 - and split off into the separate 
PR 47750.

The attached patch sets the "Error:" and "Warning:" prefix and fixes the 
fall out. In particular, lib/gcc-dg.exp seems to expect that there is 
always a line number and a column number. And gfortran's line numbers 
can be complicated such as "file:line.8-12:" if one has two error 
locations [(1) and (2)] in the same line. Furthermore, gcc-dg recognizes 
":" instead of "." as line-column separator. (Remember also that some of 
the errors are generated via the middle end.)

Besides the lib/* changes, I had also to modify several test cases. I 
have not checked whether warning vs. error makes sense. In particular, I 
have the feeling that for PR 45743 an error would be more suitable. 
Thus, if you review the patch, you could look also at the changes and 
fill a PR if you think a warning should be an error or vice versa.

Regtested on x86-64-linux.
OK for the trunk?

Tobias
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dg-v3.diff
Type: text/x-patch
Size: 25194 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20110215/2995e544/attachment.bin>


More information about the Fortran mailing list