re PR fortran/25324 (Wrong DW_TAG_compile_unit generated when compiling preprocessed...
authorJakub Jelinek <jakub@redhat.com>
Fri, 27 Jan 2006 20:01:55 +0000 (21:01 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Fri, 27 Jan 2006 20:01:55 +0000 (21:01 +0100)
commit2d7c7df665fd79a85731ca2a5d9d31775d2bc81e
treeb37f5669c2cae6d982523e270287247aebe416d2
parent602ea4d30716a6c72c6ee7fc8207a87e58a40d80
re PR fortran/25324 (Wrong DW_TAG_compile_unit generated when compiling preprocessed fortran code)

PR fortran/25324
* Make-lang.in (fortran/scanner.o): Depend on toplev.h.
* lang.opt (fpreprocessed): New option.
* scanner.c: Include toplev.h.
(gfc_src_file, gfc_src_preprocessor_lines): New variables.
(preprocessor_line): Unescape filename if there were any
backslashes.
(load_file): If initial and gfc_src_file is not NULL,
use it rather than opening the file.  If gfc_src_preprocessor_lines
has non-NULL elements, pass it to preprocessor_line.
(unescape_filename, gfc_read_orig_filename): New functions.
* gfortran.h (gfc_option_t): Add flag_preprocessed.
(gfc_read_orig_filename): New prototype.
* options.c (gfc_init_options): Clear flag_preprocessed.
(gfc_post_options): If flag_preprocessed, call
gfc_read_orig_filename.
(gfc_handle_option): Handle OPT_fpreprocessed.
* lang-specs.h: Pass -fpreprocessed to f951 if preprocessing
sources.

From-SVN: r110304
gcc/fortran/ChangeLog
gcc/fortran/Make-lang.in
gcc/fortran/gfortran.h
gcc/fortran/lang-specs.h
gcc/fortran/lang.opt
gcc/fortran/options.c
gcc/fortran/scanner.c