diff options
| author | Paul Thomas <pault@gcc.gnu.org> | 2006-08-24 04:47:28 +0000 |
|---|---|---|
| committer | Paul Thomas <pault@gcc.gnu.org> | 2006-08-24 04:47:28 +0000 |
| commit | 96f4873b16293268e23759c39dc03f1eca20ea1f (patch) | |
| tree | 04cac1635ef2fee2d58d2c4f176508431c278ea9 /gcc/fortran/decl.c | |
| parent | 664ee581a846a244e26c4e62b3770eae46c965ed (diff) | |
| download | gcc-96f4873b16293268e23759c39dc03f1eca20ea1f.zip gcc-96f4873b16293268e23759c39dc03f1eca20ea1f.tar.gz gcc-96f4873b16293268e23759c39dc03f1eca20ea1f.tar.bz2 | |
re PR fortran/28788 (ICE on valid code)
2006-08-23 Paul Thomas <pault@gcc.gnu.org>
PR fortran/28788
* gfortran.dg/used_types_4.f90: New test.
* gfortran.dg/derived_init_2.f90: Modify to check sibling
association of derived types.
* gfortran.dg/used_types_2.f90: Add module cleanup.
* gfortran.dg/used_types_3.f90: The same.
PR fortran/28771
* gfortran.dg/assumed_charlen_in_main.f90: Modify to check
fix of regression.
2006-08-23 Paul Thomas <pault@gcc.gnu.org>
PR fortran/28788
* gfortran.dg/used_types_4.f90: New test.
* gfortran.dg/derived_init_2.f90: Modify to check sibling
association of derived types.
* gfortran.dg/used_types_2.f90: Add module cleanup.
* gfortran.dg/used_types_3.f90: The same.
PR fortran/28771
* gfortran.dg/assumed_charlen_in_main.f90: Modify to check
fix of regression.
From-SVN: r116369
Diffstat (limited to 'gcc/fortran/decl.c')
| -rw-r--r-- | gcc/fortran/decl.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/fortran/decl.c b/gcc/fortran/decl.c index 79310e9..19bf1b0 100644 --- a/gcc/fortran/decl.c +++ b/gcc/fortran/decl.c @@ -875,6 +875,10 @@ add_init_expr_to_sym (const char *name, gfc_expr ** initp, sym->ts.cl = gfc_get_charlen (); sym->ts.cl->next = gfc_current_ns->cl_list; gfc_current_ns->cl_list = sym->ts.cl; + + if (sym->attr.flavor == FL_PARAMETER + && init->expr_type == EXPR_ARRAY) + sym->ts.cl->length = gfc_copy_expr (init->ts.cl->length); } /* Update initializer character length according symbol. */ else if (sym->ts.cl->length->expr_type == EXPR_CONSTANT) |
