diff options
author | Janus Weil <janus@gcc.gnu.org> | 2008-11-01 14:24:03 +0100 |
---|---|---|
committer | Janus Weil <janus@gcc.gnu.org> | 2008-11-01 14:24:03 +0100 |
commit | c6acea9d4fd505ca611df1f8b248bbbecaa4fef6 (patch) | |
tree | 3bdd5ff69b6c21e149a0a9da51fcbf7311b75671 /gcc/fortran/trans-expr.c | |
parent | 002bd9f0ac7a90a1c0ed1488033505758df6c8df (diff) | |
download | gcc-c6acea9d4fd505ca611df1f8b248bbbecaa4fef6.zip gcc-c6acea9d4fd505ca611df1f8b248bbbecaa4fef6.tar.gz gcc-c6acea9d4fd505ca611df1f8b248bbbecaa4fef6.tar.bz2 |
re PR fortran/36322 (ICE with PROCEDURE using a complicated interface)
2008-11-01 Janus Weil <janus@gcc.gnu.org>
PR fortran/36322
PR fortran/36463
* gfortran.h: New function gfc_expr_replace_symbols.
* decl.c (match_procedure_decl): Increase reference count for interface.
* expr.c: New functions replace_symbol and gfc_expr_replace_symbols.
* resolve.c (resolve_symbol): Correctly copy array spec and char len
of PROCEDURE declarations from their interface.
* symbol.c (gfc_get_default_type): Enhanced error message.
(copy_formal_args): Call copy_formal_args recursively for arguments.
* trans-expr.c (gfc_conv_function_call): Bugfix.
2008-11-01 Janus Weil <janus@gcc.gnu.org>
PR fortran/36322
PR fortran/36463
* gfortran.dg/proc_decl_17.f90: New.
* gfortran.dg/proc_decl_18.f90: New.
From-SVN: r141515
Diffstat (limited to 'gcc/fortran/trans-expr.c')
-rw-r--r-- | gcc/fortran/trans-expr.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/fortran/trans-expr.c b/gcc/fortran/trans-expr.c index e0f2f77..1c14ac1 100644 --- a/gcc/fortran/trans-expr.c +++ b/gcc/fortran/trans-expr.c @@ -2716,7 +2716,8 @@ gfc_conv_function_call (gfc_se * se, gfc_symbol * sym, && parmse.string_length == NULL_TREE && e->ts.type == BT_PROCEDURE && e->symtree->n.sym->ts.type == BT_CHARACTER - && e->symtree->n.sym->ts.cl->length != NULL) + && e->symtree->n.sym->ts.cl->length != NULL + && e->symtree->n.sym->ts.cl->length->expr_type == EXPR_CONSTANT) { gfc_conv_const_charlen (e->symtree->n.sym->ts.cl); parmse.string_length = e->symtree->n.sym->ts.cl->backend_decl; |