ICE when using derived type with c_ptr component

Andrew Benson abenson@its.caltech.edu
Thu Aug 18 21:13:00 GMT 2011


Hi Janus,

> > I couldn't find a anything which looks like this open in bugzilla.
> 
> well, if it's fixed in recent versions, then the corresponding PR will
> be closed already.
> 
> > The ICE goes away if I remove the " = c_null_ptr" or if I replace the two
> > "use typeMod"s with a single one in the scope of "testMod". The code
> > compiles correctly with gfortran 4.6.0 - I haven't tried it with any
> > other versions.
> 
> It also works for me with 4.5.4. Would be great if you could update at
> least to 4.5.x.
> 
> If we can identify the fix for this bug and if it's simple, one could
> also consider backporting to 4.4. On the other hand, 4.4 is quite old
> yet, and I don't think there will be an awful lot of releases to come
> in the 4.4.x series.

I thought I'd report it in case anyone thought it was worth backporting a fix, 
but given that there's a simple workaround, I can see that it might not be 
worth while. I'm using 4.6.0 and trunk for most of my work, but this is an 
older (i.e. about 18 months old!) code that relies on the way that gfortran 
4.4 handled type-bound procedures and so won't compile with gfortran 4.5 or 
later (I have an updated version that works with those but haven't released it 
yet). 

Thanks,
Andrew.

-- 

* Andrew Benson: http://www.tapir.caltech.edu/~abenson/contact.html

* Galacticus: http://sites.google.com/site/galacticusmodel



More information about the Fortran mailing list