This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: [PATCH] Fix debug info when compiling preprocessed fortran sources (.F, .F90, .F95)
- From: Tobias Schlüter <tobias dot schlueter at physik dot uni-muenchen dot de>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org, fortran at gcc dot gnu dot org
- Date: Sat, 31 Dec 2005 14:05:39 +0100
- Subject: Re: [PATCH] Fix debug info when compiling preprocessed fortran sources (.F, .F90, .F95)
- References: <20051231124845.GC22293@devserv.devel.redhat.com>
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