From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23273 invoked by alias); 8 May 2014 15:45:06 -0000 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 Received: (qmail 23230 invoked by uid 48); 8 May 2014 15:45:02 -0000 From: "mrestelli at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/61115] New: ICE with type bound proc => non_overridable type bound proc Date: Thu, 08 May 2014 15:45:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Version: 4.10.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: mrestelli at gmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-05/txt/msg00698.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=61115 Bug ID: 61115 Summary: ICE with type bound proc => non_overridable type bound proc Product: gcc Version: 4.10.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: mrestelli at gmail dot com The attached (valid, I think) code produces an internal compiler error. The NON_OVERRIDABLE attribute is required to produce the error. $ gfortran -c m.f90 f951: interner Compiler-Fehler: in gfc_add_component_ref, bei fortran/class.c:236 0x55f02f gfc_add_component_ref(gfc_expr*, char const*) gcc/fortran/class.c:236 0x5ca297 resolve_typebound_subroutine gcc/fortran/resolve.c:5943 0x5ca297 resolve_code gcc/fortran/resolve.c:9933 0x5cc92e resolve_codes gcc/fortran/resolve.c:14642 0x5cc837 resolve_codes gcc/fortran/resolve.c:14628 0x5cca12 gfc_resolve gcc/fortran/resolve.c:14670 0x5b82f2 gfc_parse_file() gcc/fortran/parse.c:4665 0x5f5455 gfc_be_parse_file gcc/fortran/f95-lang.c:188 gfortran --version GNU Fortran (GCC) 4.10.0 20140508 (experimental) module m implicit none private type, abstract :: tt contains generic :: gen_f => ff ! Notice: eliminating the non_overridable everything works procedure, pass(this), non_overridable :: ff end type tt contains subroutine ff(this) class(tt) :: this ! do nothing end subroutine ff subroutine some_procedure(this) class(tt), intent(inout) :: this call this%gen_f() ! does not work !call this%ff() ! works end subroutine some_procedure end module m