Hi Manuel,
Manuel López-Ibáñez wrote:
This patch actually does not touch linemap but I will appreciate
Dodji's comments about the approach. The problem is that in case of
long lines, the column hint of 120 might be too small, thus we do not
have enough locations within one line to point to a higher column
(like 132 in the testcase). Giving as column hint the length of the
line seems the right fix.
[...]
My fix here is to create a dummy location for line_len -1 (the last column in
the line). This forces the next map to start after this last column's location.
My feeling is that that doesn't work for
-ffree-line-length-none/-ffixed-line-length-none. In that case,
gfc_option.free_line_length == 0 and there is no limit to the number of
characters per line. Thus, I fear that
b->location
- = linemap_line_start (line_table, current_file->line++, 120);
+ = linemap_line_start (line_table, current_file->line++, line_len);
might even set the line length to 0 – but I haven't checked. For all
other values, it should work.
Tobias