diff options
author | tromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-02-26 16:05:24 +0000 |
---|---|---|
committer | tromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-02-26 16:05:24 +0000 |
commit | 9c85a98a2b03f3bacaba6103c8112066d0d272bb (patch) | |
tree | f43ad37c53fe9e709732439c80643fe626116583 /gcc/fortran | |
parent | c039429494a2dec15ad4bf0b4a6d2fcc13ce8298 (diff) | |
download | gcc-9c85a98a2b03f3bacaba6103c8112066d0d272bb.tar.gz |
gcc
* system.h (USE_MAPPED_LOCATION): Poison.
* Makefile.in (GTFILES): Put CPP_ID_DATA_H first.
* tree-cfg.c (make_cond_expr_edges): Remove old location code.
(make_goto_expr_edges): Likewise.
(remove_bb): Likewise.
(execute_warn_function_return): Likewise.
* basic-block.h (struct edge_def) <goto_locus>: Change type to
location_t.
* c-common.c (fname_decl): Remove old location code.
* tree-vect-transform.c (vect_finish_stmt_generation): Remove old
location code.
* rtl.h (ASM_OPERANDS_SOURCE_LOCATION): Remove old-location
variant.
(ASM_INPUT_SOURCE_LOCATION): Likewise.
(gen_rtx_ASM_INPUT): Likewise.
(gen_rtx_ASM_INPUT_loc): Likewise.
(get_rtx_asm_OPERANDS): Remove.
* cfglayout.c (insn_locators_alloc): Remove old location code.
(set_curr_insn_source_location): Likewise.
(curr_insn_locator): Likewise.
* print-tree.c (print_node): Remove old location code.
* tree-mudflap.c (mf_varname_tree): Remove old location code.
(mf_file_function_line_tree): Remove test of USE_MAPPED_LOCATION.
* cfgexpand.c (expand_gimple_cond_expr): Don't use
location_from_locus.
(construct_exit_block): Remove old location code.
* emit-rtl.c (force_next_line_note): Remove old location code.
* profile.c (branch_prob): Remove old location code.
* tree-vectorizer.h (LOC, UNKNOWN_LOC, EXPR_LOC, LOC_FILE,
LOC_LINE): Remove old-location variants.
* langhooks.c (lhd_print_error_function): Remove old location
code.
* configure, config.in: Rebuilt.
* configure.ac (--enable-mapped-location): Remove.
* c-decl.c (c_init_decl_processing): Remove old location code.
(finish_function): Likewise.
* recog.c (decode_asm_operands): Remove old location code.
* c-pch.c (c_common_read_pch): Remove old location code.
* rtl.def (ASM_INPUT, ASM_OPERANDS): Remove old location
variants.
* gimple-low.c (lower_function_body): Remove old location code.
* toplev.c (unknown_location): Remove.
(push_srcloc): Remove old-location variant.
(process_options): Remove old location code.
(lang_dependent_init): Likewise.
* input.h (UNKNOWN_LOCATION): Move definition.
(location_t): Undeprecate.
(source_locus): Remove.
(location_from_locus): Remove.
(struct location_s): Remove.
Remove all old-location code.
(input_line, input_filename): Remove.
* final.c (final_scan_insn): Remove old location code.
* diagnostic.c (diagnostic_build_prefix): Remove
USE_MAPPED_LOCATION test.
* tree.h (gimple_stmt) <locus>: Now a location_t.
(tree_exp) <locus>: Likewise.
(DECL_IS_BUILTIN): Remove old-location variant.
(annotate_with_file_line, annotate_with_locus): Likewise.
(expr_locus, set_expr_locus): Update.
* tree.c (build1_stat): Remove old location code.
(last_annotated_node): Remove.
(annotate_with_file_line): Remove old-location variant.
(annotate_with_locus): Likewise.
(expr_location): Remove old location code.
(set_expr_location): Likewise.
(expr_has_location): Likewise.
(expr_locus): Likewise.
(set_expr_locus): Likewise.
(expr_filename): Don't use location_from_locus.
(expr_lineno): Likewise.
* rtl-error.c (location_for_asm): Remove old location code.
* c-lex.c (cb_line_change): Remove old location code.
(fe_file_change): Likewise.
(cb_def_pragma): Likewise.
(c_lex_with_flags): Likewise.
* gengtype.c (do_typedef): Don't special-case location types.
(define_location_structures): Remove.
(main): Don't call define_location_structures.
* tree-pretty-print.c (dump_implicit_edges): Remove old location
code.
gcc/ada
* misc.c (internal_error_function): Remove test of
USE_MAPPED_LOCATION.
* trans.c (gigi): Remove test of USE_MAPPED_LOCATION.
(Sloc_to_locus): Remove old location code.
gcc/cp
* parser.c (eof_token): Remove old location code.
(check_empty_body): Remove test of USE_MAPPED_LOCATION.
* decl2.c (generate_ctor_or_dtor_function): Remove old location
code.
(cp_write_global_declarations): Likewise.
* lex.c (cxx_init): Remove old location code.
(handle_pragma_implementation): Remove test of
USE_MAPPED_LOCATION.
* pt.c (tsubst): Remove old location code.
* error.c (cp_print_error_function): Remove test of
USE_MAPPED_LOCATION.
* decl.c (pop_label): Remove old location code.
(finish_function): Likewise.
gcc/fortran
* trans-io.c (set_error_locus): Remove old location code.
* trans-decl.c (gfc_set_decl_location): Remove old location code.
* f95-lang.c (gfc_init): Remove test of USE_MAPPED_LOCATION.
* scanner.c (gfc_gobble_whitespace): Remove old location code.
(get_file): Likewise.
(preprocessor_line): Likewise.
(load_file): Likewise.
(gfc_new_file): Likewise.
* trans.c (gfc_trans_runtime_check): Remove old location code.
(gfc_get_backend_locus): Likewise.
(gfc_set_backend_locus): Likewise.
* data.c (gfc_assign_data_value): Remove old location code.
* error.c (show_locus): Remove old location code.
* gfortran.h (gfc_linebuf): Remove old location code.
(gfc_linebuf_linenum): Remove old-location variant.
gcc/java
* lang.c (java_post_options): Remove conditional.
* expr.c (expand_byte_code): Remove old location code.
* jcf-parse.c (set_source_filename): Remove old location code.
(give_name_to_class): Likewise.
(jcf_parse): Likewise.
(duplicate_class_warning): Likewise.
(parse_class_file): Likewise.
(java_parse_file): Likewise.
* decl.c (finish_method): Remove old location code.
* class.c (push_class): Remove old location code.
gcc/objc
* objc-act.c (objc_init): Remove old location code.
gcc/treelang
* tree1.c (treelang_init): Remove old location code.
(treelang_parse_file): Likewise.
* lex.l (LINEMAP_POSITION_FOR_COLUMN): Remove.
(update_lineno_charno): Remove old location code.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@132679 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fortran')
-rw-r--r-- | gcc/fortran/ChangeLog | 18 | ||||
-rw-r--r-- | gcc/fortran/data.c | 5 | ||||
-rw-r--r-- | gcc/fortran/error.c | 4 | ||||
-rw-r--r-- | gcc/fortran/f95-lang.c | 2 | ||||
-rw-r--r-- | gcc/fortran/gfortran.h | 8 | ||||
-rw-r--r-- | gcc/fortran/scanner.c | 19 | ||||
-rw-r--r-- | gcc/fortran/trans-decl.c | 5 | ||||
-rw-r--r-- | gcc/fortran/trans-io.c | 4 | ||||
-rw-r--r-- | gcc/fortran/trans.c | 13 |
9 files changed, 18 insertions, 60 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 5ba83fb7b87..aef1c7934f7 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,21 @@ +2008-02-26 Tom Tromey <tromey@redhat.com> + + * trans-io.c (set_error_locus): Remove old location code. + * trans-decl.c (gfc_set_decl_location): Remove old location code. + * f95-lang.c (gfc_init): Remove test of USE_MAPPED_LOCATION. + * scanner.c (gfc_gobble_whitespace): Remove old location code. + (get_file): Likewise. + (preprocessor_line): Likewise. + (load_file): Likewise. + (gfc_new_file): Likewise. + * trans.c (gfc_trans_runtime_check): Remove old location code. + (gfc_get_backend_locus): Likewise. + (gfc_set_backend_locus): Likewise. + * data.c (gfc_assign_data_value): Remove old location code. + * error.c (show_locus): Remove old location code. + * gfortran.h (gfc_linebuf): Remove old location code. + (gfc_linebuf_linenum): Remove old-location variant. + 2008-02-25 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org> PR fortran/34729 diff --git a/gcc/fortran/data.c b/gcc/fortran/data.c index 1fe2ee51f9d..13af445dfd4 100644 --- a/gcc/fortran/data.c +++ b/gcc/fortran/data.c @@ -424,14 +424,9 @@ gfc_assign_data_value (gfc_expr *lvalue, gfc_expr *rvalue, mpz_t index) /* Order in which the expressions arrive here depends on whether they are from data statements or F95 style declarations. Therefore, check which is the most recent. */ -#ifdef USE_MAPPED_LOCATION expr = (LOCATION_LINE (init->where.lb->location) > LOCATION_LINE (rvalue->where.lb->location)) ? init : rvalue; -#else - expr = (init->where.lb->linenum > rvalue->where.lb->linenum) - ? init : rvalue; -#endif gfc_notify_std (GFC_STD_GNU, "Extension: re-initialization " "of '%s' at %L", symbol->name, &expr->where); } diff --git a/gcc/fortran/error.c b/gcc/fortran/error.c index 0718e5af5b5..669c2d47a6b 100644 --- a/gcc/fortran/error.c +++ b/gcc/fortran/error.c @@ -182,11 +182,7 @@ show_locus (locus *loc, int c1, int c2) error_string (f->filename); error_char (':'); -#ifdef USE_MAPPED_LOCATION error_integer (LOCATION_LINE (lb->location)); -#else - error_integer (lb->linenum); -#endif if ((c1 > 0) || (c2 > 0)) error_char ('.'); diff --git a/gcc/fortran/f95-lang.c b/gcc/fortran/f95-lang.c index ea795b24f74..643f41865e4 100644 --- a/gcc/fortran/f95-lang.c +++ b/gcc/fortran/f95-lang.c @@ -276,10 +276,8 @@ gfc_be_parse_file (int set_yydebug ATTRIBUTE_UNUSED) static bool gfc_init (void) { -#ifdef USE_MAPPED_LOCATION linemap_add (line_table, LC_ENTER, false, gfc_source_file, 1); linemap_add (line_table, LC_RENAME, false, "<built-in>", 0); -#endif /* First initialize the backend. */ gfc_init_decl_processing (); diff --git a/gcc/fortran/gfortran.h b/gcc/fortran/gfortran.h index 5aef5bf1158..cc749792604 100644 --- a/gcc/fortran/gfortran.h +++ b/gcc/fortran/gfortran.h @@ -713,11 +713,7 @@ typedef struct gfc_file typedef struct gfc_linebuf { -#ifdef USE_MAPPED_LOCATION source_location location; -#else - int linenum; -#endif struct gfc_file *file; struct gfc_linebuf *next; @@ -729,11 +725,7 @@ typedef struct gfc_linebuf #define gfc_linebuf_header_size (offsetof (gfc_linebuf, line)) -#ifdef USE_MAPPED_LOCATION #define gfc_linebuf_linenum(LBUF) (LOCATION_LINE ((LBUF)->location)) -#else -#define gfc_linebuf_linenum(LBUF) ((LBUF)->linenum) -#endif typedef struct { diff --git a/gcc/fortran/scanner.c b/gcc/fortran/scanner.c index ad3b5158334..b93e1c65478 100644 --- a/gcc/fortran/scanner.c +++ b/gcc/fortran/scanner.c @@ -1064,11 +1064,7 @@ gfc_gobble_whitespace (void) line will be scanned multiple times. */ if (!gfc_option.warn_tabs && c == '\t') { -#ifdef USE_MAPPED_LOCATION int cur_linenum = LOCATION_LINE (gfc_current_locus.lb->location); -#else - int cur_linenum = gfc_current_locus.lb->linenum; -#endif if (cur_linenum != linenum) { linenum = cur_linenum; @@ -1285,9 +1281,7 @@ get_file (const char *name, enum lc_reason reason ATTRIBUTE_UNUSED) if (current_file != NULL) f->inclusion_line = current_file->line; -#ifdef USE_MAPPED_LOCATION linemap_add (line_table, reason, false, f->filename, 1); -#endif return f; } @@ -1412,10 +1406,8 @@ preprocessor_line (char *c) add_file_change (NULL, line); current_file = current_file->up; -#ifdef USE_MAPPED_LOCATION linemap_add (line_table, LC_RENAME, false, current_file->filename, current_file->line); -#endif } /* The name of the file can be a temporary file produced by @@ -1645,12 +1637,8 @@ load_file (const char *filename, bool initial) b = gfc_getmem (gfc_linebuf_header_size + len + 1); -#ifdef USE_MAPPED_LOCATION b->location = linemap_line_start (line_table, current_file->line++, 120); -#else - b->linenum = current_file->line++; -#endif b->file = current_file; b->truncated = trunc; strcpy (b->line, line); @@ -1674,9 +1662,7 @@ load_file (const char *filename, bool initial) if (!initial) add_file_change (NULL, current_file->inclusion_line + 1); current_file = current_file->up; -#ifdef USE_MAPPED_LOCATION linemap_add (line_table, LC_LEAVE, 0, NULL, 0); -#endif return SUCCESS; } @@ -1699,13 +1685,8 @@ gfc_new_file (void) #if 0 /* Debugging aid. */ for (; line_head; line_head = line_head->next) gfc_status ("%s:%3d %s\n", -#ifdef USE_MAPPED_LOCATION LOCATION_FILE (line_head->location), LOCATION_LINE (line_head->location), -#else - line_head->file->filename, - line_head->linenum, -#endif line_head->line); exit (0); diff --git a/gcc/fortran/trans-decl.c b/gcc/fortran/trans-decl.c index 52393b46bf2..70609aca135 100644 --- a/gcc/fortran/trans-decl.c +++ b/gcc/fortran/trans-decl.c @@ -224,12 +224,7 @@ gfc_get_return_label (void) void gfc_set_decl_location (tree decl, locus * loc) { -#ifdef USE_MAPPED_LOCATION DECL_SOURCE_LOCATION (decl) = loc->lb->location; -#else - DECL_SOURCE_LINE (decl) = loc->lb->linenum; - DECL_SOURCE_FILE (decl) = loc->lb->file->filename; -#endif } diff --git a/gcc/fortran/trans-io.c b/gcc/fortran/trans-io.c index d0af3429db4..f5f1df0c7c2 100644 --- a/gcc/fortran/trans-io.c +++ b/gcc/fortran/trans-io.c @@ -851,11 +851,7 @@ set_error_locus (stmtblock_t * block, tree var, locus * where) str = gfc_build_addr_expr (pchar_type_node, str); gfc_add_modify_expr (block, locus_file, str); -#ifdef USE_MAPPED_LOCATION line = LOCATION_LINE (where->lb->location); -#else - line = where->lb->linenum; -#endif set_parameter_const (block, var, IOPARM_common_line, line); } diff --git a/gcc/fortran/trans.c b/gcc/fortran/trans.c index 11ef0bf540c..36a7f122c0b 100644 --- a/gcc/fortran/trans.c +++ b/gcc/fortran/trans.c @@ -382,11 +382,7 @@ gfc_trans_runtime_check (tree cond, stmtblock_t * pblock, locus * where, if (where) { -#ifdef USE_MAPPED_LOCATION line = LOCATION_LINE (where->lb->location); -#else - line = where->lb->linenum; -#endif asprintf (&message, "At line %d of file %s", line, where->lb->file->filename); } @@ -940,11 +936,7 @@ void gfc_get_backend_locus (locus * loc) { loc->lb = gfc_getmem (sizeof (gfc_linebuf)); -#ifdef USE_MAPPED_LOCATION loc->lb->location = input_location; -#else - loc->lb->linenum = input_line; -#endif loc->lb->file = gfc_current_backend_file; } @@ -955,12 +947,7 @@ void gfc_set_backend_locus (locus * loc) { gfc_current_backend_file = loc->lb->file; -#ifdef USE_MAPPED_LOCATION input_location = loc->lb->location; -#else - input_line = loc->lb->linenum; - input_filename = loc->lb->file->filename; -#endif } |