diff options
author | Paul Thomas <pault@gcc.gnu.org> | 2007-04-23 15:13:48 +0000 |
---|---|---|
committer | Paul Thomas <pault@gcc.gnu.org> | 2007-04-23 15:13:48 +0000 |
commit | 6e0d7c6e0d8d744a57e2d111ab95a7ab8115ebf8 (patch) | |
tree | cd69678252d64187f28421f356008d5cce4dce95 /gcc/fortran/resolve.c | |
parent | a8a423360bf1e0e8dffac6087084a129d9251dc4 (diff) | |
download | gcc-6e0d7c6e0d8d744a57e2d111ab95a7ab8115ebf8.zip gcc-6e0d7c6e0d8d744a57e2d111ab95a7ab8115ebf8.tar.gz gcc-6e0d7c6e0d8d744a57e2d111ab95a7ab8115ebf8.tar.bz2 |
re PR fortran/31630 (ICE on nasty derived types code)
2007-04-23 Paul Thomas <pault@gcc.gnu.org>
PR fortran/31630
* resolve.c (resolve_symbol): Allow resolution of formal
namespaces nested within formal namespaces coming from modules.
PR fortran/31620
* trans-expr.c (gfc_trans_assignment): Make the call to
gfc_trans_zero_assign conditional on the lhs array ref being
the only reference.
2007-04-23 Paul Thomas <pault@gcc.gnu.org>
PR fortran/31630
* gfortran.dg/used_types_17.f90: New test.
PR fortran/31620
* gfortran.dg/zero_array_components_1.f90: New test.
From-SVN: r124069
Diffstat (limited to 'gcc/fortran/resolve.c')
-rw-r--r-- | gcc/fortran/resolve.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c index 7ad4f55..c759f69 100644 --- a/gcc/fortran/resolve.c +++ b/gcc/fortran/resolve.c @@ -6339,12 +6339,15 @@ resolve_symbol (gfc_symbol *sym) formal_arg_flag = 0; - /* Resolve formal namespaces. */ - + /* Resolve formal namespaces. The symbols in formal namespaces that + themselves are from procedures in formal namespaces will not stand + resolution, except when they are use associated. + TODO: Fix the symbols in formal namespaces so that resolution can + be done unconditionally. */ if (formal_ns_flag && sym != NULL && sym->formal_ns != NULL) { formal_ns_save = formal_ns_flag; - formal_ns_flag = 0; + formal_ns_flag = sym->attr.use_assoc ? 1 : 0; gfc_resolve (sym->formal_ns); formal_ns_flag = formal_ns_save; } |