[Patch, fortran] Fix PR fortran/50050 breakage: ICE on valid with null pointer initialization
Andrew Benson
abenson@its.caltech.edu
Tue Aug 23 22:15:00 GMT 2011
Hi Mikael:
> this is an attempt to fix my recent breakage for PR50050.
> I forgot that shape can't always be known, and thus, that for some
> expressions, the shape field is a NULL pointer.
>
> This patch adds an early return in gfc_free_shape in the case shape is
> NULL. Then some external NULL shape checks are redundant and can be
> removed. I added some asserts in the cases there was no check before, so
> that the code is strictly equivalent.
That patch works for me - both for the test case and for the full library that
I was attempting to compile.
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