From 60332588d6194a8636748a484f102d8b36eef80d Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Wed, 5 Dec 2007 20:50:56 +0100 Subject: re PR debug/33739 (Failure of gfortran.dg/literal_character_constant_1_*.F with -m64 -g on Darwin) PR debug/33739 * gfortran.h (gfc_file): Remove included_by field, add sibling and down. (gfc_start_source_files, gfc_end_source_files): New prototypes. * parse.c (gfc_parse_file): Call gfc_start_source_files and gfc_end_source_files instead of calling the debugging hooks directly. * error.c (show_locus): Use up field instead of included_by. * scanner.c (change_file, gfc_start_source_files, gfc_end_source_files): New functions. (gfc_advance_line): Call change_file instead of calling debug hooks directly. (get_file): Set up rather than included_by. Initialize down and sibling. (preprocessor_line, load_file): Don't set up field here. * gfortran.dg/debug_2.f: New test. From-SVN: r130629 --- gcc/fortran/parse.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'gcc/fortran/parse.c') diff --git a/gcc/fortran/parse.c b/gcc/fortran/parse.c index 3e20b78fba2..c941b4e5d29 100644 --- a/gcc/fortran/parse.c +++ b/gcc/fortran/parse.c @@ -3289,10 +3289,7 @@ gfc_parse_file (void) gfc_statement st; 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); + gfc_start_source_files (); top.state = COMP_NONE; top.sym = NULL; @@ -3404,9 +3401,7 @@ loop: goto loop; done: - if (debug_hooks->start_end_main_source_file) - (*debug_hooks->end_source_file) (0); - + gfc_end_source_files (); return SUCCESS; duplicate_main: -- cgit v1.2.1