re PR fortran/33538 (bootstrap break in fortran on *-apple-darwin r128671)

PR fortran/33538
	* scanner.c, parse.c, gfortran.h: Revert revision 128671.

From-SVN: r128724
This commit is contained in:
Francois-Xavier Coudert 2007-09-24 20:24:11 +00:00 committed by François-Xavier Coudert
parent 06d20fa91b
commit 7b7bdf67e0
4 changed files with 7 additions and 68 deletions

View File

@ -1,3 +1,8 @@
2007-09-24 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
PR fortran/33538
* scanner.c, parse.c, gfortran.h: Revert revision 128671.
2007-09-23 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org> 2007-09-23 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
PR fortran/33528 PR fortran/33528

View File

@ -1935,7 +1935,6 @@ int gfc_at_bol (void);
int gfc_at_eol (void); int gfc_at_eol (void);
void gfc_advance_line (void); void gfc_advance_line (void);
int gfc_check_include (void); int gfc_check_include (void);
int gfc_define_undef_line (void);
void gfc_skip_comments (void); void gfc_skip_comments (void);
int gfc_next_char_literal (int); int gfc_next_char_literal (int);

View File

@ -25,7 +25,6 @@ along with GCC; see the file COPYING3. If not see
#include "gfortran.h" #include "gfortran.h"
#include "match.h" #include "match.h"
#include "parse.h" #include "parse.h"
#include "debug.h"
/* Current statement label. Zero means no statement label. Because new_st /* Current statement label. Zero means no statement label. Because new_st
can get wiped during statement matching, we have to keep it separate. */ can get wiped during statement matching, we have to keep it separate. */
@ -674,9 +673,6 @@ next_statement (void)
break; break;
} }
if (gfc_define_undef_line ())
continue;
st = (gfc_current_form == FORM_FIXED) ? next_fixed () : next_free (); st = (gfc_current_form == FORM_FIXED) ? next_fixed () : next_free ();
if (st != ST_NONE) if (st != ST_NONE)
@ -3223,11 +3219,6 @@ gfc_parse_file (void)
gfc_statement st; gfc_statement st;
locus prog_locus; locus prog_locus;
/* If the debugger wants the name of the main source file,
we give it. */
if (debug_hooks->start_end_main_source_file)
(*debug_hooks->start_source_file) (0, gfc_source_file);
top.state = COMP_NONE; top.state = COMP_NONE;
top.sym = NULL; top.sym = NULL;
top.previous = NULL; top.previous = NULL;
@ -3338,9 +3329,6 @@ loop:
goto loop; goto loop;
done: done:
if (debug_hooks->start_end_main_source_file)
(*debug_hooks->end_source_file) (0);
return SUCCESS; return SUCCESS;
duplicate_main: duplicate_main:

View File

@ -45,8 +45,6 @@ along with GCC; see the file COPYING3. If not see
#include "system.h" #include "system.h"
#include "gfortran.h" #include "gfortran.h"
#include "toplev.h" #include "toplev.h"
#include "debug.h"
#include "flags.h"
/* Structure for holding module and include file search path. */ /* Structure for holding module and include file search path. */
typedef struct gfc_directorylist typedef struct gfc_directorylist
@ -314,20 +312,6 @@ gfc_advance_line (void)
return; return;
} }
if (gfc_current_locus.lb->next)
{
if (gfc_current_locus.lb->file->next
&& gfc_current_locus.lb->file->up == gfc_current_locus.lb->file->next)
/* We exit from an included file. */
(*debug_hooks->end_source_file)
(gfc_linebuf_linenum (gfc_current_locus.lb->next));
else if (gfc_current_locus.lb->next->file != gfc_current_locus.lb->file)
/* We enter into a new file. */
(*debug_hooks->start_source_file)
(gfc_linebuf_linenum (gfc_current_locus.lb),
gfc_current_locus.lb->next->file->filename);
}
gfc_current_locus.lb = gfc_current_locus.lb->next; gfc_current_locus.lb = gfc_current_locus.lb->next;
if (gfc_current_locus.lb != NULL) if (gfc_current_locus.lb != NULL)
@ -388,31 +372,6 @@ skip_comment_line (void)
} }
int
gfc_define_undef_line (void)
{
/* All lines beginning with '#' are either #define or #undef. */
if (! (debug_info_level == DINFO_LEVEL_VERBOSE
&& (write_symbols == DWARF2_DEBUG
|| write_symbols == VMS_AND_DWARF2_DEBUG))
|| gfc_peek_char () != '#')
return 0;
if (strncmp (gfc_current_locus.nextc, "#define ", 8) == 0)
(*debug_hooks->define) (gfc_linebuf_linenum (gfc_current_locus.lb),
&(gfc_current_locus.nextc[8]));
if (strncmp (gfc_current_locus.nextc, "#undef ", 7) == 0)
(*debug_hooks->undef) (gfc_linebuf_linenum (gfc_current_locus.lb),
&(gfc_current_locus.nextc[7]));
/* Skip the rest of the line. */
skip_comment_line ();
return 1;
}
/* Comment lines are null lines, lines containing only blanks or lines /* Comment lines are null lines, lines containing only blanks or lines
on which the first nonblank line is a '!'. on which the first nonblank line is a '!'.
Return true if !$ openmp conditional compilation sentinel was Return true if !$ openmp conditional compilation sentinel was
@ -1546,20 +1505,8 @@ load_file (const char *filename, bool initial)
if (line[0] == '#') if (line[0] == '#')
{ {
/* When -g3 is specified, it's possible that we emit #define preprocessor_line (line);
and #undef lines, which we need to pass to the middle-end continue;
so that it can emit correct debug info. */
if (debug_info_level == DINFO_LEVEL_VERBOSE
&& (write_symbols == DWARF2_DEBUG
|| write_symbols == VMS_AND_DWARF2_DEBUG)
&& (strncmp (line, "#define ", 8) == 0
|| strncmp (line, "#undef ", 7) == 0))
;
else
{
preprocessor_line (line);
continue;
}
} }
/* Preprocessed files have preprocessor lines added before the byte /* Preprocessed files have preprocessor lines added before the byte