This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/38404] New: Warning message identifies incorrect line
- From: "steve dot chapel at a2pg dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 4 Dec 2008 17:02:41 -0000
- Subject: [Bug fortran/38404] New: Warning message identifies incorrect line
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
When the following program (truncbug.f) is compiled with gfortran 4.3.2:
SUBROUTINE ERRMSG(N,STRING,LST)
CHARACTER*72 TEXT(2)
DATA (TEXT(I),I=1,2)/
X'MUST BE "CALL SIMEPS(EPS)"',
X'"R" IN CALL RANDOM MAY NOT BE USED OUTSIDE THE BLOCK CONTAINING T
XHE CALL.'/
END
This warning message results:
truncbug.f:4.72:
X'MUST BE "CALL SIMEPS(EPS)"',
1
Warning: initialization string truncated to match variable at (1)
This is two lines before the line that the string truncation occurs on.
Ideally, gfortran should put the (1) mark at the character in the string where
the truncation occurs.
--
Summary: Warning message identifies incorrect line
Product: gcc
Version: 4.3.2
Status: UNCONFIRMED
Severity: minor
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: steve dot chapel at a2pg dot com
GCC build triplet: i386-redhat-linux
GCC host triplet: i386-redhat-linux
GCC target triplet: i386-redhat-linux
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38404