[Patch, Fortran, OOP] PR 42769: ICE in resolve_typebound_procedure
Janus Weil
janus@gcc.gnu.org
Sun Aug 29 19:23:00 GMT 2010
Hi all,
here is another small OOP wrong-code patch (fixing comment #27 of the
aforementioned PR). All it does is to make sure a vtab is generated
for modules like this:
module mod1
type :: t1
contains
procedure, nopass :: get => my_get
end type
contains
integer function my_get()
my_get = 1
end function
end module
Usually we only build a vtab once we find a CLASS variable. In this
module we have no CLASS variable (due to NOPASS), but still we need a
vtab. Therefore we generate one in 'resolve_typebound_procedures',
which in turn guarantees that we initialize the TBP pointer with the
right procedure. The second hunk was needed fix a testsuite
regression.
The only testsuite failure I see with this patch is 'float128_1.f90',
which surely has a different origin.
Ok for trunk?
Cheers,
Janus
2010-08-29 Janus Weil <janus@gcc.gnu.org>
PR fortran/42769
* resolve.c (resolve_structure_cons): For derived types, make sure the
type has been resolved.
(resolve_typebound_procedures): Make sure the vtab has been generated.
2010-08-29 Janus Weil <janus@gcc.gnu.org>
PR fortran/42769
* gfortran.dg/dynamic_dispatch_11.f03: New.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr42769.diff
Type: application/octet-stream
Size: 1237 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20100829/c0d10b94/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dynamic_dispatch_11.f03
Type: application/octet-stream
Size: 648 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20100829/c0d10b94/attachment-0001.obj>
More information about the Gcc-patches
mailing list