BLOCK DATA ?
Tobias Schlüter
tobias.schlueter@physik.uni-muenchen.de
Mon Aug 30 12:24:00 GMT 2004
Forgot two things:
1) CC: gcc-patches
2) ChangeLog
- Tobi
2004-08-30 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
* parse.c (accept_statemnt): Make names of BLOCK DATA symbols unique.
Tobias Schlüter wrote:
> Built and tested. I also verified that Salvatore's testcase works now.
>
> - Tobi
>
> Index: parse.c
> ===================================================================
> RCS file: /cvs/gcc/gcc/gcc/fortran/parse.c,v
> retrieving revision 1.17
> diff -u -p -r1.17 parse.c
> --- parse.c 17 Aug 2004 15:34:09 -0000 1.17
> +++ parse.c 30 Aug 2004 12:02:13 -0000
> @@ -1062,8 +1062,12 @@ accept_statement (gfc_statement st)
> {
> gfc_symbol *block_data = NULL;
> symbol_attribute attr;
> + static int serial = 0;
> + char name[GFC_MAX_SYMBOL_LEN+1];
>
> - gfc_get_symbol ("_BLOCK_DATA__", gfc_current_ns, &block_data);
> + snprintf (name, GFC_MAX_SYMBOL_LEN, "_BLOCK_DATA_%d", serial++);
> +
> + gfc_get_symbol (name, gfc_current_ns, &block_data);
> gfc_clear_attr (&attr);
> attr.flavor = FL_PROCEDURE;
> attr.proc = PROC_UNKNOWN;
>
More information about the Fortran
mailing list