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/51334] [OOP] ICE with type-bound operator: tree check: expected record_type or union_type or qual_union_type, have function_type in gfc_conv_component_ref, at fortran/trans-expr.c:556


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51334

Tobias Burnus <burnus at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Depends on|                            |46328

--- Comment #1 from Tobias Burnus <burnus at gcc dot gnu.org> 2011-11-28 17:39:08 UTC ---
The issue seems to be again the nested operators. One has for:
  deriv    = diff * solution%nabla2()

an outer obj_assign_obj(obj1, obj2) operator and as inner operator the RHS ==
obj2, which is "real_times_obj", defined as:
        function real_times_obj( factor, obj ) result(newobj)
            real, intent(in)                    :: factor
            class(base_pde_object), intent(in)  :: obj
            class(base_pde_object), allocatable :: newobj
As further nesting level, there is the inner nabla2() function, which returns
again at CLASS:
  function nabla2( obj )
    class(base_pde_object), intent(in)  :: obj
    class(base_pde_object), allocatable :: nabla2

And at some point one needs to access (expr->vtab->(procedure))(expr->value)
which fails without a temporary.

Thus, I think this bug is effectively a duplicate of PR 46328.


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