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

Re: [PATCH] Fix debug info when compiling preprocessed fortran sources (.F, .F90, .F95)


Hi Jakub,

Jakub Jelinek wrote:
> https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=175071
> Given say
> echo '      END' > D.F
> gfortran -g -dA -S -o D.s D.F
> gfortran outputs incorrect debug info, referencing the temporary
> preprocessed source as the actual source file rather than the original
> file.  This patch changes specs so that when preprocessing a Fortran
> source, new -fpreprocessed flag is passed to f951 and f951 then immitates
> what libcpp's cpp_read_main_file and read_original_filename do, i.e.
> in post_options lang hook read the original filename and current directory
> from the preprocessed Fortran source.

Wouldn't it be more robust (and possibly simpler) to use libcpp inside the
Fortran frontend, and to thus do away completely with the need for a temporary
file?  I think this would be a preferable solution, but I'm sure you had
reasons to do it this way.

- Tobi


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