This is the mail archive of the 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 57306: ICE on valid with class pointer initialization

2013/7/29 Janus Weil <>:
> Hi Tobias,
>>> here is a fix for class pointer initialization.
>> I think the patch looks reasonable.
> well, it may appear so ...
>> Additionally, the CLASS are wrongly initialized: You only set "_data"
>> (indirectly as it is the first field/component of the class) but you do not
>> set the _vptr component.
> ... but as you point out, it clearly produces wrong code :(
> 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

> gfortran-4.9 class_defined_operator_1.f03
> ./a.out

Program received signal SIGSEGV: Segmentation fault - invalid memory reference.

Will investigate ...


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