From: Francois-Xavier Coudert Date: Fri, 16 Nov 2007 22:20:44 +0000 (+0000) Subject: re PR debug/33739 (Failure of gfortran.dg/literal_character_constant_1_*.F with ... X-Git-Tag: releases/gcc-4.3.0~1475 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4a58b9ad36aca0dfe198d8e18c9bdb38eddb4a8c;p=thirdparty%2Fgcc.git re PR debug/33739 (Failure of gfortran.dg/literal_character_constant_1_*.F with -m64 -g on Darwin) PR fortran/33739 PR fortran/34084 * scanner.c (start_source_file, end_source_file, exit_remaining_files, gfc_advance_line): Revert rev. 130016. From-SVN: r130244 --- diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index fb94711be8a6..57670b5a1330 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,10 @@ +2007-11-16 Francois-Xavier Coudert + + PR fortran/33739 + PR fortran/34084 + * scanner.c (start_source_file, end_source_file, + exit_remaining_files, gfc_advance_line): Revert rev. 130016. + 2007-11-16 Paul Thomas PR fortran/34008 diff --git a/gcc/fortran/scanner.c b/gcc/fortran/scanner.c index 89aef49b086e..b9e711491100 100644 --- a/gcc/fortran/scanner.c +++ b/gcc/fortran/scanner.c @@ -300,59 +300,13 @@ gfc_at_eol (void) } -struct file_entered_chainon -{ - gfc_file *file; - struct file_entered_chainon *prev; -}; - -static struct file_entered_chainon *last_file_entered = NULL; - -static void -start_source_file (int line, gfc_file *file) -{ - struct file_entered_chainon *f = gfc_getmem (sizeof - (struct file_entered_chainon)); - - f->file = file; - f->prev = last_file_entered; - last_file_entered = f; - - (*debug_hooks->start_source_file) (line, file->filename); -} - -static void -end_source_file (int line) -{ - gcc_assert (last_file_entered); - last_file_entered = last_file_entered->prev; - (*debug_hooks->end_source_file) (line); -} - -static void -exit_remaining_files (void) -{ - struct file_entered_chainon *f = last_file_entered; - while (f) - { - /* The line number doesn't matter much, because we're at the end of - the toplevel file anyway. */ - (*debug_hooks->end_source_file) (0); - - f = f->prev; - } -} - /* Advance the current line pointer to the next line. */ void gfc_advance_line (void) { if (gfc_at_end ()) - { - exit_remaining_files (); - return; - } + return; if (gfc_current_locus.lb == NULL) { @@ -368,15 +322,17 @@ gfc_advance_line (void) && gfc_current_locus.lb->file->up == gfc_current_locus.lb->next->file) { /* We exit from an included file. */ - end_source_file (gfc_linebuf_linenum (gfc_current_locus.lb->next)); + (*debug_hooks->end_source_file) + (gfc_linebuf_linenum (gfc_current_locus.lb->next)); gfc_current_locus.lb->next->dbg_emitted = true; } else if (gfc_current_locus.lb->next->file != gfc_current_locus.lb->file && !gfc_current_locus.lb->next->dbg_emitted) { /* We enter into a new file. */ - start_source_file (gfc_linebuf_linenum (gfc_current_locus.lb), - gfc_current_locus.lb->next->file); + (*debug_hooks->start_source_file) + (gfc_linebuf_linenum (gfc_current_locus.lb), + gfc_current_locus.lb->next->file->filename); gfc_current_locus.lb->next->dbg_emitted = true; } }