diff options
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 5ba83fb..aef1c79 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 1fe2ee5..13af445 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 0718e5a..669c2d4 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 ea795b2..643f418 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 5aef5bf..cc74979 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 ad3b515..b93e1c6 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 52393b4..70609ac 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 d0af342..f5f1df0 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 11ef0bf..36a7f12 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 } |