This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC 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]

[Bug fortran/38404] New: Warning message identifies incorrect line


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


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