This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/41600] [OOP] SELECT TYPE with associate-name => exp: Arrays not supported


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?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]