diff options
author | janus <janus@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-07-24 11:00:01 +0000 |
---|---|---|
committer | janus <janus@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-07-24 11:00:01 +0000 |
commit | 5d50997a4873b2ff4acdfe03f24b81d7ada048fd (patch) | |
tree | 2f7e8f299953745e765d7fe3393df09fcc8c678a /gcc/fortran/iresolve.c | |
parent | 6215fc9e5b8d0500eabd26cba9680796476ffad0 (diff) | |
download | gcc-5d50997a4873b2ff4acdfe03f24b81d7ada048fd.tar.gz |
2009-07-24 Janus Weil <janus@gcc.gnu.org>
PR fortran/40822
* array.c (gfc_resolve_character_array_constructor): Use new function
gfc_new_charlen.
* decl.c (add_init_expr_to_sym,variable_decl,match_char_spec,
gfc_match_implicit): Ditto.
* expr.c (gfc_simplify_expr): Ditto.
* gfortran.h (gfc_new_charlen): New prototype.
* iresolve.c (check_charlen_present,gfc_resolve_char_achar): Use new
function gfc_new_charlen.
* module.c (mio_charlen): Ditto.
* resolve.c (gfc_resolve_substring_charlen,
gfc_resolve_character_operator,fixup_charlen,resolve_fl_derived,
resolve_symbol): Ditto.
* symbol.c (gfc_new_charlen): New function to create a new gfc_charlen
structure and add it to a namespace.
(gfc_copy_formal_args_intr): Make sure ts.cl is present
for CHARACTER variables.
2009-07-24 Janus Weil <janus@gcc.gnu.org>
PR fortran/40822
* gfortran.dg/char_length_16.f90: New.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@150047 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fortran/iresolve.c')
-rw-r--r-- | gcc/fortran/iresolve.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/gcc/fortran/iresolve.c b/gcc/fortran/iresolve.c index 619d7e9546a..fdbf40c4408 100644 --- a/gcc/fortran/iresolve.c +++ b/gcc/fortran/iresolve.c @@ -63,11 +63,7 @@ static void check_charlen_present (gfc_expr *source) { if (source->ts.cl == NULL) - { - source->ts.cl = gfc_get_charlen (); - source->ts.cl->next = gfc_current_ns->cl_list; - gfc_current_ns->cl_list = source->ts.cl; - } + source->ts.cl = gfc_new_charlen (gfc_current_ns); if (source->expr_type == EXPR_CONSTANT) { @@ -165,9 +161,7 @@ gfc_resolve_char_achar (gfc_expr *f, gfc_expr *x, gfc_expr *kind, f->ts.type = BT_CHARACTER; f->ts.kind = (kind == NULL) ? gfc_default_character_kind : mpz_get_si (kind->value.integer); - f->ts.cl = gfc_get_charlen (); - f->ts.cl->next = gfc_current_ns->cl_list; - gfc_current_ns->cl_list = f->ts.cl; + f->ts.cl = gfc_new_charlen (gfc_current_ns); f->ts.cl->length = gfc_int_expr (1); f->value.function.name = gfc_get_string (name, f->ts.kind, |