[Patch, Fortran, OOP] PR 57306: ICE on valid with class pointer initialization
Janus Weil
janus@gcc.gnu.org
Tue Jul 30 07:15:00 GMT 2013
2013/7/30 Janus Weil <janus@gcc.gnu.org>:
>>> The attached new version should do the right thing now. At least it
>>> shows the correct dump for the original test case as well as yours. It
>>> is currently being regtested.
>>
>> unfortunately it shows a couple of runtime problems with type-bound operators:
>>
>> FAIL: gfortran.dg/class_defined_operator_1.f03 -O0 execution test
>> FAIL: gfortran.dg/typebound_operator_13.f03 -O0 execution test
>> FAIL: gfortran.dg/typebound_operator_7.f03 -O0 execution test
>> FAIL: gfortran.dg/typebound_operator_8.f03 -O0 execution test
>> FAIL: gfortran.dg/typebound_operator_9.f03 -O0 execution test
>
> The attached update fixes it, and thus should hopefully be
> regression-free. It also renames 'gfc_class_null_initializer' to
> 'gfc_class_initializer', since it now also does other initializations
> beside EXPR_NULL.
>
> Will do another regtest to make sure it's clean.
No failures observed. As a test case I'm using now Tobias' extended
version (attached). New ChangeLog below.
Ok for trunk?
Cheers,
Janus
2013-07-30 Janus Weil <janus@gcc.gnu.org>
PR fortran/57306
* class.c (gfc_class_null_initializer): Rename to
'gfc_class_initializer'. Treat non-NULL init-exprs.
* gfortran.h (gfc_class_null_initializer): Update prototype.
* trans-decl.c (gfc_get_symbol_decl): Treat class pointers.
* trans-expr.c (gfc_conv_initializer): Ditto.
(gfc_trans_subcomponent_assign): Renamed gfc_class_null_initializer.
2013-07-30 Janus Weil <janus@gcc.gnu.org>
PR fortran/57306
* gfortran.dg/pointer_init_8.f90: New.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr57306_v4.diff
Type: application/octet-stream
Size: 4699 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20130730/10c9ec86/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pointer_init_8.f90
Type: application/octet-stream
Size: 573 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20130730/10c9ec86/attachment-0001.obj>
More information about the Fortran
mailing list