From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20858 invoked by alias); 23 Aug 2010 13:26:07 -0000 Received: (qmail 20695 invoked by uid 48); 23 Aug 2010 13:25:55 -0000 Date: Mon, 23 Aug 2010 13:26:00 -0000 Message-ID: <20100823132555.20694.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug fortran/42769] [OOP] ICE in resolve_typebound_procedure In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "janus at gcc dot gnu dot org" 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: 2010-08/txt/msg01856.txt.bz2 ------- Comment #27 from janus at gcc dot gnu dot org 2010-08-23 13:25 ------- (In reply to comment #24) > Here is a somewhat modified version of comment #14, which compiles but produces > wrong code: The example in comment #24 contains a statically-resolved TBP call (the pass object is non-polymorphic). One can construct an analogous version with a polymorphic TBP call, which also fails: > module mod1 > type :: t1 > contains > procedure, nopass :: get => my_get > end type > contains > subroutine my_get() > print *,"my_get (mod1)" > end subroutine > end module > > module mod2 > contains > subroutine my_get() ! must have the same name as the function in mod1 > print *,"my_get (mod2)" > end subroutine > end module use mod2 use mod1 ! order of use statements is important class(t1),allocatable :: a allocate(a) call a%get() end -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42769