[Patch, fortran] PR29098 - allocation of a pointer to a derived type crashes

Paul Thomas paulthomas2@wanadoo.fr
Sun Sep 17 11:39:00 GMT 2006


:ADDPATCH fortran:

In the end, I took a third option to fix this PR:

Ultimately, the failure to resolve the actual argument list was 
occurring in resolve.c(resolve_structure_cons).  This was returning 
FAILURE on finding a NULL  expression.  I have been unable to think of 
any situation where this is warranted, nor I have generated bad code 
that gets clobbered by this.  Also, in translation, empty expressions 
are correctly treated, by the same continuation to the next component.  
The testcase is that provided by the reporter.

It should be noted that in trying to break this patch, I generated 
PR29115. *sigh*

Regtested on FC5/Athlon - OK for trunk and 4.1?

Paul

2006-09-17  Paul Thomas  <pault@gcc.gnu.org>

    PR fortran/29098
    * resolve.c (resolve_structure_cons): Do not return FAILURE if
    component expression is NULL.

2006-09-17  Paul Thomas  <pault@gcc.gnu.org>

    PR fortran/29098
    * gfortran.dg/default_initialization_2.f90: New test.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr29098.diff
Type: text/x-patch
Size: 2000 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20060917/193b9833/attachment.bin>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: pr29098.msg
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20060917/193b9833/attachment.ksh>


More information about the Gcc-patches mailing list