This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: BLOCK DATA ?


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;
> 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]