diff options
author | pbrook <pbrook@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-09-07 14:43:37 +0000 |
---|---|---|
committer | pbrook <pbrook@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-09-07 14:43:37 +0000 |
commit | b31f705bc2e1acb43b04e00cea8a3bdceef51a2a (patch) | |
tree | 52dd9f205592562d8c793717e022109001b07465 /gcc/fortran/error.c | |
parent | 779b4c4151fa540c2d6a7e4cb0d9e735f887fbc3 (diff) | |
download | ppe42-gcc-b31f705bc2e1acb43b04e00cea8a3bdceef51a2a.tar.gz ppe42-gcc-b31f705bc2e1acb43b04e00cea8a3bdceef51a2a.zip |
2004-09-07 Per Bothner <per@bothner.com>
Paul Brook <paul@codesourcery.com>
* error.c (show_locus): Handle mapped locations.
* f95-lang.c (gfc_be_parse_file): Initialize mapped locations.
* gfortran.h: Include input.h.
(struct gfc_linebuf): Use source_location.
* scanner.c (get_file): Initialize linemap.
(preprocessor_line): Pass extra argument to get_file.
(load_file): Ditto. Setup linemap.
(gfc_new_file): Handle mapped locations.
* trans-common.c (build_field, build_equiv_decl, build_common_decl):
Set decl source locations.
(gfc_trans_common): Set blank common block location.
* trans-decl.c (gfc_set_decl_location): New function.
(gfc_get_label_decl, gfc_get_symbol_decl): Use it.
(trans_function_start): Move call to gfc_set_backend_locus..
(build_function_decl): ... to here.
(build_entry_thunks): Set and restore the backend locus.
(gfc_generate_constructors): Remove excess arguments to
init_function_start.
(gfc_generate_block_data): Add comments. Set the decl locus.
* trans-io.c (set_error_locus): Handle mapped locations.
* trans.c (gfc_get_backend_locus, gfc_get_backend_locus): Ditto.
(gfc_trans_code): Use SET_EXPR_LOCATION.
(gfc_generate_code): Override the location of the new symbol.
* trans.h (gfc_set_decl_location): Add prototype.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@87142 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fortran/error.c')
-rw-r--r-- | gcc/fortran/error.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/gcc/fortran/error.c b/gcc/fortran/error.c index d028d5a2b3a..3c0d5c891ee 100644 --- a/gcc/fortran/error.c +++ b/gcc/fortran/error.c @@ -127,7 +127,13 @@ show_locus (int offset, locus * loc) lb = loc->lb; f = lb->file; - error_printf ("In file %s:%d\n", f->filename, lb->linenum); + error_printf ("In file %s:%d\n", f->filename, +#ifdef USE_MAPPED_LOCATION + LOCATION_LINE (lb->location) +#else + lb->linenum +#endif + ); for (;;) { |