diff options
author | fxcoudert <fxcoudert@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-09-22 23:48:02 +0000 |
---|---|---|
committer | fxcoudert <fxcoudert@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-09-22 23:48:02 +0000 |
commit | b15ea5ea473a31cdf395fd2d0c0f0a2d5a7b55ef (patch) | |
tree | f7150e7c3fc9d5b73002928ba55948db4f0f38d7 /gcc/fortran/scanner.c | |
parent | 7972a953604ef62043c2cadfbfd2115b9df9e737 (diff) | |
download | gcc-b15ea5ea473a31cdf395fd2d0c0f0a2d5a7b55ef.tar.gz |
PR fortran/33528
* scanner.c (preprocessor_line): Call linemap_add when exiting
a file.
(gfc_new_file): Adjust debug code for USE_MAPPED_LOCATION.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@128676 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fortran/scanner.c')
-rw-r--r-- | gcc/fortran/scanner.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/gcc/fortran/scanner.c b/gcc/fortran/scanner.c index ef2bbcd921e..1db454207d4 100644 --- a/gcc/fortran/scanner.c +++ b/gcc/fortran/scanner.c @@ -1341,7 +1341,12 @@ preprocessor_line (char *c) gfc_free (filename); return; } + current_file = current_file->up; +#ifdef USE_MAPPED_LOCATION + linemap_add (line_table, LC_RENAME, false, current_file->filename, + current_file->line); +#endif } /* The name of the file can be a temporary file produced by @@ -1620,10 +1625,12 @@ gfc_new_file (void) #if 0 /* Debugging aid. */ for (; line_head; line_head = line_head->next) - gfc_status ("%s:%3d %s\n", line_head->file->filename, + gfc_status ("%s:%3d %s\n", #ifdef USE_MAPPED_LOCATION + LOCATION_FILE (line_head->location), LOCATION_LINE (line_head->location), #else + line_head->file->filename, line_head->linenum, #endif line_head->line); |