diff options
author | Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de> | 2005-02-24 14:01:44 +0100 |
---|---|---|
committer | Tobias Schlüter <tobi@gcc.gnu.org> | 2005-02-24 14:01:44 +0100 |
commit | f5e9e99c8d49990706d1a1b80f5ea9e9db2a534a (patch) | |
tree | d95c3b91fb77172e12ce112a85f983bc25d726e9 /gcc/fortran/symbol.c | |
parent | c74636694956af8e2fe74bbeddf72891b9b5cfb1 (diff) | |
download | gcc-f5e9e99c8d49990706d1a1b80f5ea9e9db2a534a.zip gcc-f5e9e99c8d49990706d1a1b80f5ea9e9db2a534a.tar.gz gcc-f5e9e99c8d49990706d1a1b80f5ea9e9db2a534a.tar.bz2 |
Revert yesterday's patch:
2005-02-23 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
* gfortran.h (gfc_component, gfc_actual_arglist, ...
... argument. Copy string instead of pointing to it.
From-SVN: r95496
Diffstat (limited to 'gcc/fortran/symbol.c')
-rw-r--r-- | gcc/fortran/symbol.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/gcc/fortran/symbol.c b/gcc/fortran/symbol.c index 0b5e8e7..77d3f1a 100644 --- a/gcc/fortran/symbol.c +++ b/gcc/fortran/symbol.c @@ -1157,7 +1157,7 @@ gfc_add_component (gfc_symbol * sym, const char *name, gfc_component ** componen else tail->next = p; - p->name = gfc_get_string (name); + strcpy (p->name, name); p->loc = gfc_current_locus; *component = p; @@ -1613,7 +1613,7 @@ gfc_new_symtree (gfc_symtree ** root, const char *name) gfc_symtree *st; st = gfc_getmem (sizeof (gfc_symtree)); - st->name = gfc_get_string (name); + strcpy (st->name, name); gfc_insert_bbt (root, st, compare_symtree); return st; @@ -1629,7 +1629,7 @@ delete_symtree (gfc_symtree ** root, const char *name) st0 = gfc_find_symtree (*root, name); - st.name = gfc_get_string (name); + strcpy (st.name, name); gfc_delete_bbt (root, &st, compare_symtree); gfc_free (st0); @@ -1674,7 +1674,7 @@ gfc_get_uop (const char *name) st = gfc_new_symtree (&gfc_current_ns->uop_root, name); uop = st->n.uop = gfc_getmem (sizeof (gfc_user_op)); - uop->name = gfc_get_string (name); + strcpy (uop->name, name); uop->access = ACCESS_UNKNOWN; uop->ns = gfc_current_ns; @@ -1743,7 +1743,7 @@ gfc_new_symbol (const char *name, gfc_namespace * ns) if (strlen (name) > GFC_MAX_SYMBOL_LEN) gfc_internal_error ("new_symbol(): Symbol name too long"); - p->name = gfc_get_string (name); + strcpy (p->name, name); return p; } @@ -1754,7 +1754,7 @@ static void ambiguous_symbol (const char *name, gfc_symtree * st) { - if (st->n.sym->module) + if (st->n.sym->module[0]) gfc_error ("Name '%s' at %C is an ambiguous reference to '%s' " "from module '%s'", name, st->n.sym->name, st->n.sym->module); else @@ -2362,7 +2362,7 @@ gfc_symbol_state(void) { /* Search a tree for the global symbol. */ gfc_gsymbol * -gfc_find_gsymbol (gfc_gsymbol *symbol, const char *name) +gfc_find_gsymbol (gfc_gsymbol *symbol, char *name) { gfc_gsymbol *s; @@ -2399,7 +2399,7 @@ gsym_compare (void * _s1, void * _s2) /* Get a global symbol, creating it if it doesn't exist. */ gfc_gsymbol * -gfc_get_gsymbol (const char *name) +gfc_get_gsymbol (char *name) { gfc_gsymbol *s; |