[patch,gfortran] PR 24245: ICE with -fdump-parse-tree

Tobias.Schlueter@Physik.Uni-Muenchen.DE Tobias.Schlueter@Physik.Uni-Muenchen.DE
Tue Nov 1 19:32:00 GMT 2005


Quoting Erik Edelmann <erik.edelmann@iki.fi>:
> 2005-11-01  Erik Edelmann  <eedelman@gcc.gnu.org>
>
> 	PR 24245
> 	* trans.c (gfc_generate_code): Move code to create a main
> 	program symbol from here ...
> 	* parse.c (main_program_symbol): ... to this new
> 	function, setting the locus from gfc_current_locus
> 	instead of ns->code->loc.
> 	(gfc_parse_file):  Call main_program_symbol for main programs.
> 	* dump-parse-tree.c (show_symtree): Uncomment call to
> 	gfc_status.

You should only do this in the second case in gfc_parse_file, in the first case
there will already be a symbol with the name the user gave it, e.g.
   PROGRAM mymainprogram

Otherwise this is of course ok.

- Tobi



More information about the Fortran mailing list