From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5463 invoked by alias); 28 Nov 2011 17:39:55 -0000 Received: (qmail 5451 invoked by uid 22791); 28 Nov 2011 17:39:54 -0000 X-SWARE-Spam-Status: No, hits=-2.9 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 28 Nov 2011 17:39:40 +0000 From: "burnus at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [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 Date: Mon, 28 Nov 2011 17:59:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: burnus at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Depends on Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2011-11/txt/msg02681.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51334 Tobias Burnus changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |46328 --- Comment #1 from Tobias Burnus 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.