[Patch, Fortran] PR 41177: Some corrections on base-object checks with type-bound procedures.

Daniel Kraft d@domob.eu
Mon Nov 30 14:33:00 GMT 2009


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?

Yours,
Daniel

-- 
Done:  Arc-Bar-Cav-Ran-Rog-Sam-Tou-Val-Wiz
To go: Hea-Kni-Mon-Pri
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: patch.changelog
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20091130/1e7c4c55/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: patch.diff
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20091130/1e7c4c55/attachment-0001.ksh>


More information about the Fortran mailing list