[Patch, Fortran] PR 42647: Missed initialization/dealloc of allocatable scalar DT with allocatable component

Janus Weil janus@gcc.gnu.org
Tue Oct 12 20:35:00 GMT 2010


Hi all,

the attached draft patch implements auto-deallocation for allocatable
scalars with allocatable components (as in comment #0 of the PR). It
does so by introducing a new function "gfc_auto_deallocate", which not
only deallocates an allocatable scalar variable itself, but before
that also deallocates its allocatable components (if applicable).

This seems to work fine at -O0, but the patch currently still has two
regressions at -O1 and higher:
 * allocatable_scalar_9.f90
 * class_19.f03

Both test cases compile and run fine without optimization, but with
-O1 they show:

allocatable_scalar_9.f90: In function ‘MAIN__’:
allocatable_scalar_9.f90:29:0: error: statement makes a memory store,
but has no VDEFS
a4_193.b4.data = 0B;
allocatable_scalar_9.f90:29:0: internal compiler error: verify_ssa failed


Unfortunately I don't have any idea what the above error is supposed
to tell me. Can anyone give me a hint what's going wrong here?

Cheers,
Janus
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr42647_v2.diff
Type: application/octet-stream
Size: 2508 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20101012/6f7f3af8/attachment.obj>


More information about the Fortran mailing list