public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
* [Bug fortran/42647] Missed initialization/dealloc of allocatable scalar DT with allocatable component [not found] <bug-42647-4@http.gcc.gnu.org/bugzilla/> @ 2010-10-13 13:22 ` burnus at gcc dot gnu.org 2010-10-25 16:25 ` [Bug fortran/42647] [F03] " janus at gcc dot gnu.org ` (2 subsequent siblings) 3 siblings, 0 replies; 4+ messages in thread From: burnus at gcc dot gnu.org @ 2010-10-13 13:22 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42647 --- Comment #11 from Tobias Burnus <burnus at gcc dot gnu.org> 2010-10-13 13:21:40 UTC --- (In reply to comment #10) > allocate(a1, a1%b1, a1%b1%c1) This ALLOCATE statement is INVALID! It violates the following: "An allocate-object [...] shall not depend [...] on the [...] allocation status [...] of any allocate-object in the same ALLOCATE statement." (F2008, "6.7.1 ALLOCATE statement" first paragraph after C644.) Solution: Write it as allocate(a1) allocate(a1%b1) allocate(a1%b1%c1) The test case still fails: For the DEALLOCATE statement one wrongly gets the error that the variable is not allocated. * * * Cf. also Janus' patch for this PR (which does not yet fix this DEALLOCATE issue): http://gcc.gnu.org/ml/fortran/2010-10/msg00155.html ^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug fortran/42647] [F03] Missed initialization/dealloc of allocatable scalar DT with allocatable component [not found] <bug-42647-4@http.gcc.gnu.org/bugzilla/> 2010-10-13 13:22 ` [Bug fortran/42647] Missed initialization/dealloc of allocatable scalar DT with allocatable component burnus at gcc dot gnu.org @ 2010-10-25 16:25 ` janus at gcc dot gnu.org 2010-10-26 17:39 ` janus at gcc dot gnu.org 2010-10-26 17:52 ` janus at gcc dot gnu.org 3 siblings, 0 replies; 4+ messages in thread From: janus at gcc dot gnu.org @ 2010-10-25 16:25 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42647 janus at gcc dot gnu.org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED AssignedTo|unassigned at gcc dot |janus at gcc dot gnu.org |gnu.org | Summary|Missed |[F03] Missed |initialization/dealloc of |initialization/dealloc of |allocatable scalar DT with |allocatable scalar DT with |allocatable component |allocatable component ^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug fortran/42647] [F03] Missed initialization/dealloc of allocatable scalar DT with allocatable component [not found] <bug-42647-4@http.gcc.gnu.org/bugzilla/> 2010-10-13 13:22 ` [Bug fortran/42647] Missed initialization/dealloc of allocatable scalar DT with allocatable component burnus at gcc dot gnu.org 2010-10-25 16:25 ` [Bug fortran/42647] [F03] " janus at gcc dot gnu.org @ 2010-10-26 17:39 ` janus at gcc dot gnu.org 2010-10-26 17:52 ` janus at gcc dot gnu.org 3 siblings, 0 replies; 4+ messages in thread From: janus at gcc dot gnu.org @ 2010-10-26 17:39 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42647 --- Comment #12 from janus at gcc dot gnu.org 2010-10-26 17:38:51 UTC --- Author: janus Date: Tue Oct 26 17:38:42 2010 New Revision: 165973 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=165973 Log: 2010-10-26 Janus Weil <janus@gcc.gnu.org> PR fortran/42647 * trans.h (gfc_deallocate_scalar_with_status): New prototype. * trans.c (gfc_deallocate_scalar_with_status): New function for deallocation of allocatable scalars. * trans-array.c (structure_alloc_comps): Call it here ... * trans-decl.c (gfc_trans_deferred_vars): ... here ... * trans-stmt.c (gfc_trans_deallocate): ... and here. 2010-10-26 Janus Weil <janus@gcc.gnu.org> PR fortran/42647 * gfortran.dg/allocatable_scalar_9.f90: Extended. * gfortran.dg/allocatable_scalar_10.f90: New. * gfortran.dg/class_19.f03: Extended. Added: trunk/gcc/testsuite/gfortran.dg/allocatable_scalar_10.f90 Modified: trunk/gcc/fortran/ChangeLog trunk/gcc/fortran/trans-array.c trunk/gcc/fortran/trans-decl.c trunk/gcc/fortran/trans-stmt.c trunk/gcc/fortran/trans.c trunk/gcc/fortran/trans.h trunk/gcc/testsuite/ChangeLog trunk/gcc/testsuite/gfortran.dg/allocatable_scalar_9.f90 trunk/gcc/testsuite/gfortran.dg/class_19.f03 ^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug fortran/42647] [F03] Missed initialization/dealloc of allocatable scalar DT with allocatable component [not found] <bug-42647-4@http.gcc.gnu.org/bugzilla/> ` (2 preceding siblings ...) 2010-10-26 17:39 ` janus at gcc dot gnu.org @ 2010-10-26 17:52 ` janus at gcc dot gnu.org 3 siblings, 0 replies; 4+ messages in thread From: janus at gcc dot gnu.org @ 2010-10-26 17:52 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42647 janus at gcc dot gnu.org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Resolution| |FIXED --- Comment #13 from janus at gcc dot gnu.org 2010-10-26 17:51:30 UTC --- r165973 fixes all the deallocation trouble and the accepts-invalid problem from comment #10/#11 is being tracked by PR46017. So I think we can finally close this PR. ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-10-26 17:52 UTC | newest] Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- [not found] <bug-42647-4@http.gcc.gnu.org/bugzilla/> 2010-10-13 13:22 ` [Bug fortran/42647] Missed initialization/dealloc of allocatable scalar DT with allocatable component burnus at gcc dot gnu.org 2010-10-25 16:25 ` [Bug fortran/42647] [F03] " janus at gcc dot gnu.org 2010-10-26 17:39 ` janus at gcc dot gnu.org 2010-10-26 17:52 ` janus at gcc dot gnu.org
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).