[Patch, fortran] PR34681 & PR34704 (4.3 regression) - default initialisers/allocatable/allocatable components

Paul Richard Thomas paul.richard.thomas@gmail.com
Tue Jan 8 13:42:00 GMT 2008


:ADDPATCH fortran:

The attached patch corrects a couple of errors in the application of
default initializers to arrays of derived types with allocatable
components, especially where the array is allocatable.

Regtested on Cygwin_NT - OK for trunk?

I will bootstrap and regtest on x86_ia64 before committing.

Paul

2008-01-08  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/34681
	* trans_array.c (gfc_trans_deferred_array): Do not null the
	data pointer on entering scope, nor deallocate it on leaving
	scope, if the symbol has the 'save' attribute.

	PR fortran/34704
	* trans_decl.c (gfc_finish_var_decl): Derived types with
	allocatable components and an initializer must be TREE_STATIC.

2008-01-08  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/34681
	PR fortran/34704
	* gfortran.dg/alloc_comp_default_init_1.f90: New test.

-- 
The knack of flying is learning how to throw yourself at the ground and miss.
       --Hitchhikers Guide to the Galaxy
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: submit.diff
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20080108/0332ca92/attachment.ksh>


More information about the Fortran mailing list