gfortran.h (gfc_gsymbol): Make name a const char *.

* gfortran.h (gfc_gsymbol): Make name a const char *.
	* symbol.c (gfc_get_gsymbol): Allocate gsymbol name via
	gfc_get_string.

From-SVN: r98942
This commit is contained in:
Tobias Schlüter 2005-04-28 23:09:04 +02:00 committed by Tobias Schlüter
parent e5d149869a
commit 973a384d4f
3 changed files with 8 additions and 2 deletions

View File

@ -1,3 +1,9 @@
2005-04-28 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
* gfortran.h (gfc_gsymbol): Make name a const char *.
* symbol.c (gfc_get_gsymbol): Allocate gsymbol name via
gfc_get_string.
2005-04-28 Francois-Xavier Coudert <coudert@clipper.ens.fr>
PR fortran/20865

View File

@ -842,7 +842,7 @@ typedef struct gfc_gsymbol
{
BBT_HEADER(gfc_gsymbol);
char name[GFC_MAX_SYMBOL_LEN+1];
const char *name;
enum { GSYM_UNKNOWN=1, GSYM_PROGRAM, GSYM_FUNCTION, GSYM_SUBROUTINE,
GSYM_MODULE, GSYM_COMMON, GSYM_BLOCK_DATA } type;

View File

@ -2410,7 +2410,7 @@ gfc_get_gsymbol (const char *name)
s = gfc_getmem (sizeof (gfc_gsymbol));
s->type = GSYM_UNKNOWN;
strcpy (s->name, name);
s->name = gfc_get_string (name);
gfc_insert_bbt (&gfc_gsym_root, s, gsym_compare);