Bug 40993 - Empty error message with long lines
Summary: Empty error message with long lines
Status: RESOLVED DUPLICATE of bug 29819
Alias: None
Product: gcc
Classification: Unclassified
Component: fortran (show other bugs)
Version: 4.3.2
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-08-07 06:49 UTC by Arjen Markus
Modified: 2010-05-06 21:29 UTC (History)
4 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2009-08-07 16:06:07


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Arjen Markus 2009-08-07 06:49:58 UTC
I ran into a peculiar bug with gfortran:

program check
   open( 10, file = 'check.inp', form = 'binary' )
                                                           ! Comment
end program

(the comment starts at column 132, but the problem actually occurs in
a long linje with trailing blanks too)

The output from the compiler is:

check.f90:2.132:

                                                                         !

  1
Error: FORM specifier in OPEN statement at (1) has invalid value 'binary'

Note that the offending code is being omitted, while for shorter
lines, the code is visible.

This was on Windows XP/MingW, with gfortran 4.3.2 (4.3.2-tdm-1 for MingW)
Comment 1 Jerry DeLisle 2009-08-07 16:06:07 UTC
The problem is that the error locus is at the end of the line rather then the end of the non-whitespace characters of the related statement.
Comment 2 Jerry DeLisle 2009-10-10 00:42:52 UTC
The problem here is we don't pass the expression locus to the tag checking routine so the best it can do is the end of the line.  To fix this is fairly mechanical, but affects many places.
Comment 3 Daniel Franke 2010-05-06 21:29:57 UTC

*** This bug has been marked as a duplicate of 29819 ***