[Patch, Fortran] PR 49324: Deep copy array constr of DT with allocatable components

Tobias Burnus burnus@net-b.de
Fri Jun 10 12:18:00 GMT 2011


This patch fixes parts of the PR 49324: There was a deep copy missing 
for assigning an array constructor of a DT with allocatable components.

Whether a deep copy is done, depends on a flag. I think the flag has 
been added to avoid a deep copy and multiple evaluation for functions, 
which return DT w/ allocatable components, and for user-defined operators.

Remains to do be done:
- RESHAPE is mishandled (design error): No deep copy.
- Reallocate on assignment fails (missing NULL initialization of the 
malloced memory).

Build and regtested on x86-64-linux. OK?

Tobias
-------------- next part --------------
A non-text attachment was scrubbed...
Name: alloc_comp_constr.diff
Type: text/x-patch
Size: 2506 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20110610/1905f512/attachment.bin>


More information about the Gcc-patches mailing list