This is the mail archive of the gcc-patches@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]

Re: [Patch, Fortran, OOP] PR 64244: [4.8/4.9/5 Regression] ICE at class.c:236 when using non_overridable


Hi Janus, hi all,

Janus Weil wrote:
here is a regression fix for a problem with the NON_OVERRIDABLE
attribute. For non-overridable type-bound procedures we do not have to
generate a call to the vtable, but can just translate it to a simple
('non-virtual') function call. In this particular case, an additional
generic binding was present, which fooled the compiler to believe that
the call goes to an overridable procedure, so it tried to generate a
call to a vtable entry which did not exist. The trick is simply to
take the NON-OVERRIDABLE attribute from the specific procedure, not
the generic one (which means the generic call has to be resolved to a
specific one first).

The patch was regtested on x86_64-unknown-linux-gnu. Ok for trunk? And
for 4.8/4.9 after some time?

OK. Thanks for the patch!

Tobias

2014-12-15  Janus Weil  <janus@gcc.gnu.org>

     PR fortran/64244
     * resolve.c (resolve_typebound_call): New argument to pass out the
     non-overridable attribute of the specific procedure.
     (resolve_typebound_subroutine): Get overridable flag from
     resolve_typebound_call.

2014-12-15  Janus Weil  <janus@gcc.gnu.org>

     PR fortran/64244
     * gfortran.dg/typebound_call_26.f90: New.


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