[Fortran, Patch] Fix for PR60357 and possibly also for 55932, 57857 and others

Andre Vehreschild vehre@gmx.de
Fri Jan 16 11:30:00 GMT 2015


Hi all,

please find attached a fix for pr60357. This patch includes work published by
Janus Weil in the bug. I have made the extensions to support allocatable
scalar components in structure constructors. This patch also addresses
allocatable deferred length char arrays in structure constructors, which are
now supported. Furthermore is the artificial string-length component set
correctly now. I hope I have covered all paths.

Please note, that this patch does not fix allocatable deferred length char
array components in types that are defined and exported in/from a module. For
this bug Tobias Burnus wrote a patch, that will hopefully be published soon. 

During development I have found several related issues in the bugtracker
notably:

pr55932 - [F03] ICE for structure constructor with scalar allocatable component
pr57959 - [F03] ICE with structure constructor with scalar allocatable comp.
pr61275 - Invalid initialization expression for ALLOCATABLE component in
structure constructor at (1) 

I haven't check which ones are covered by the patch, too. I hope for support of
Dominique here, who is a valued resource for checking conflicts and suddenly
fixed bugs. :-) Would you do that for me Dominique?

All comments welcome.

Bootstraps and regtests ok on x86_64-linux-gnu.

Regards,
	Andre

-- 
Andre Vehreschild * Kreuzherrenstr. 8 * 52062 Aachen
Tel.: +49 241 9291018 * Email: vehre@gmx.de 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr60357_1.clog
Type: application/octet-stream
Size: 560 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20150116/24280726/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr60357_1.patch
Type: text/x-patch
Size: 10613 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20150116/24280726/attachment.bin>


More information about the Fortran mailing list