Hi,
The "old" current_file->filename is referenced by linemap, thus it
cannot be freed at this point. The proper fix probably would be to
update linemap with the new filename, but in any case this trivial
patch is an improvement. This change is already suggested by a comment
in PR/36276, I arrived at it independently by investigating PR/34908.
Bootstrapped/regtested Fortran on trunk on x86_64-unknown-linux-gnu,
OK for trunk? OK for 4.3 branch after bootstrapping/regtesting there?
2008-06-20 Laurynas Biveinis <laurynas.biveinis@gmail.com>
PR fortran/34908, fortran/36276
* scanner.c (preprocessor_line): Do not call gfc_free for
current_file->filename if it differs from filename.