This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: SAVE and derived types
- From: Tobias Burnus <burnus at net-b dot de>
- To: salvatore dot filippone at uniroma2 dot it
- Cc: Fortran at gcc dot gnu dot org
- Date: Tue, 13 Mar 2007 15:24:34 +0100
- Subject: Re: SAVE and derived types
- References: <1173794276.3773.21.camel@localhost.localdomain>
Hi.
Salvatore Filippone schrieb:
> I just found this, and I believe to be a bug. If the list agrees I'll
> open a PR (this looks downright embarassing....)
>
I also believe this is a bug. It seems to be related to allocatable
components as if I change them to pointers (incl. =>NULL initialization
and allocated -> associated), it works.
Pointer:
static struct foo_type f_a = {.mv={.data=0B}};
Allocatable:
static struct foo_type f_a = {};
f_a.mv.data = 0B;
That is: The 0B initialization happens always.
Tobias