This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/41600] [OOP] SELECT TYPE with associate-name => exp: Arrays not supported
- From: "tobi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 22 Jan 2012 16:34:39 +0000
- Subject: [Bug fortran/41600] [OOP] SELECT TYPE with associate-name => exp: Arrays not supported
- Auto-submitted: auto-generated
- References: <bug-41600-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41600
Tobias SchlÃter <tobi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |tobi at gcc dot gnu.org
--- Comment #5 from Tobias SchlÃter <tobi at gcc dot gnu.org> 2012-01-22 16:34:39 UTC ---
(In reply to comment #3)
> --- a/gcc/fortran/expr.c
> +++ b/gcc/fortran/expr.c
> @@ -3776,3 +3782,8 @@ gfc_default_initializer (gfc_typespec *ts)
> if (comp->initializer)
> - ctor->expr = gfc_copy_expr (comp->initializer);
> + {
> + ctor->expr = gfc_copy_expr (comp->initializer);
> + if (comp->ts.type != comp->initializer->ts.type
> + || comp->ts.kind != comp->initializer->ts.kind)
> + gfc_convert_type_warn (ctor->expr, &comp->ts, 2, false);
> + }
Isn't gfc_compare_types() more appropriate or are derived types not allowed?