[Patch, Fortran] [4.6/4.7] PR 51435 - fix default initialization of pointers
Tobias Burnus
burnus@net-b.de
Tue Dec 6 14:20:00 GMT 2011
This patch fixes issues with the "=> null()" initialization of pointers;
the "=> tgt" initialization was working before.
The check has to take into account that allocatable components do not
count as default initializer, even if they are internally handled as
NULL initialization.
With patch:
struct data_all_t dum;
{
struct data_all_t data_all_t.2;
data_all_t.2.my_data.head = 0B;
dum = data_all_t.2;
}
without:
struct data_all_t dum;
Build and regtested on x86-64-linux.
OK for the trunk and for 4.6?
Tobias
PS: Other patches which still need to be reviewed:
- http://gcc.gnu.org/ml/fortran/2011-11/msg00250.html - no
-fcheck=bounds for character(LEN=:) to avoid ICE
- http://gcc.gnu.org/ml/fortran/2011-11/msg00253.html - (Re)enable
warning if a function result variable is not set [4.4-4.7 diagnostics
regression]
- http://gcc.gnu.org/ml/fortran/2011-12/msg00025.html - I/O: Allow real
BOZ w/ F2008
- http://gcc.gnu.org/ml/fortran/2011-12/msg00026.html - Toon's -finit-*
doc patch
-------------- next part --------------
A non-text attachment was scrubbed...
Name: def_init.diff
Type: text/x-patch
Size: 2582 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20111206/a73c330e/attachment.bin>
More information about the Fortran
mailing list