[Bug fortran/68078] segfault with allocate and stat for derived types with default initialization

2016-09-18 Thread lkrupp at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68078

lkrupp at gcc dot gnu.org changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||lkrupp at gcc dot gnu.org
 Resolution|--- |FIXED

--- Comment #4 from lkrupp at gcc dot gnu.org ---
Fixed in revison 240219.

A newly allocated object (or array or pointer) with default initialization is
now tested with the ALLOCATED() or ASSOCIATED() before initialization is done.

[Bug fortran/68078] segfault with allocate and stat for derived types with default initialization

2016-09-17 Thread lkrupp at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68078

--- Comment #3 from lkrupp at gcc dot gnu.org ---
Author: lkrupp
Date: Sun Sep 18 05:52:23 2016
New Revision: 240219

URL: https://gcc.gnu.org/viewcvs?rev=240219=gcc=rev
Log:
2016-09-17  Louis Krupp  

PR fortran/68078
* gfortran.dg/pr68078.f90: New test.
* gfortran.dg/set_vm_limit.c: New, called by pr68078.

2016_09_17  Louis Krupp  

PR fortran/68078
* resolve.c (resolve_allocate_expr): Check that derived type
pointer, object or array has been successfully allocated before
initializing.


Added:
trunk/gcc/testsuite/gfortran.dg/pr68078.f90
trunk/gcc/testsuite/gfortran.dg/set_vm_limit.c
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/resolve.c
trunk/gcc/testsuite/ChangeLog

[Bug fortran/68078] segfault with allocate and stat for derived types with default initialization

2015-10-25 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68078

Dominique d'Humieres  changed:

   What|Removed |Added

 Status|UNCONFIRMED |WAITING
   Last reconfirmed|2015-10-24 00:00:00 |2015-10-25
 Ever confirmed|0   |1

--- Comment #1 from Dominique d'Humieres  ---
Confirmed from 4.8 up to trunk (6.0). Duplicate of pr59796?


[Bug fortran/68078] segfault with allocate and stat for derived types with default initialization

2015-10-25 Thread Joost.VandeVondele at mat dot ethz.ch
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68078

Joost VandeVondele  changed:

   What|Removed |Added

 Status|WAITING |NEW

--- Comment #2 from Joost VandeVondele  
---
(In reply to Dominique d'Humieres from comment #1)
> Confirmed from 4.8 up to trunk (6.0). Duplicate of pr59796?

pr59796 is a different issue (a deallocate on dangling pointers), which I don't
think is standard conforming. This PR is for standard conforming code, and will
only fail in the presence of default initialization.