This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/60500] [4.8/4.9/5 Regression] Spurious warning on derived type initialization
- From: "mikael at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 16 Mar 2015 12:10:30 +0000
- Subject: [Bug fortran/60500] [4.8/4.9/5 Regression] Spurious warning on derived type initialization
- Auto-submitted: auto-generated
- References: <bug-60500-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60500
Mikael Morin <mikael at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |mikael at gcc dot gnu.org
--- Comment #5 from Mikael Morin <mikael at gcc dot gnu.org> ---
(In reply to Richard Biener from comment #2)
> possibly the L.1 label is misplaced? At least the result would crash if
> malloc returned NULL.
>
Mmh, yes; it seems L.1 should come after the (default-)initialization of the
just allocated array.
There is nothing that can be done inside gfc_trans_allocate, because
initialization comes from a frontend-generated statement after the allocate
statement (introduced at revision r164305).