This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Patch, Fortran] PR 41177: Some corrections on base-object checks with type-bound procedures.
- From: Paul Richard Thomas <paul dot richard dot thomas at gmail dot com>
- To: Daniel Kraft <d at domob dot eu>
- Cc: Fortran List <fortran at gcc dot gnu dot org>, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 1 Dec 2009 09:06:50 +0100
- Subject: Re: [Patch, Fortran] PR 41177: Some corrections on base-object checks with type-bound procedures.
- References: <4B12C7D4.6000203@domob.eu> <4B13D125.4030401@domob.eu>
Daniel,
Since this improves the firewall between OOP and f95, I think that
this patch should be applied to trunk. The fact that it fixes a bug
as well is a bonus!
Paul
On Mon, Nov 30, 2009 at 3:05 PM, Daniel Kraft <d@domob.eu> wrote:
> Daniel Kraft wrote:
>>
>> Hi all,
>>
>> this patch is some take in the direction of PR 41177. ?It adds checks that
>> the passed-object dummy argument of a type-bound procedure must be scalar,
>> non-POINTER and non-ALLOCATABLE which is at the moment simply overlooked
>> (thus there's some accepts-invalid here which gets fixed).
>>
>> On the other hand, the actual base-objects in calls were checked to be
>> scalar which is wrong. ?This is only required when calling NOPASS
>> procedures; I did correct this. ?However, there turned unfortunatly an ICE
>> up when translating such calls for non-scalar base object, thus PR 41177 is
>> not fully fixed and I added an additional check with a "not implemented"
>> message to catch up in that case until the ICE gets fixed, too.
>>
>> Still I would like to commit this patch as it is right now and think this
>> will be already some step in the right direction.
>>
>> Unfortunatly, the POINTER attribute on CLASS dummies gets always set in
>> decl.c:encapsulate_class_symbol; I thus had to introduce a new flag storing
>> the original value in this case for my check -- this is what Janus also
>> suggested. ?But if someone else can come up with a nicer solution, I'd be
>> happy to implement it.
>>
>> I'm still building the patch after a SVN update and will then regression
>> test on GNU/Linux-x86-32. ?Ok for trunk if no failures?
>
> Build and regtest was successful.
>
>
> --
> Done: ?Arc-Bar-Cav-Ran-Rog-Sam-Tou-Val-Wiz
> To go: Hea-Kni-Mon-Pri
>
--
The knack of flying is learning how to throw yourself at the ground and miss.
--Hitchhikers Guide to the Galaxy