public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "pault at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/41478] Corrupted memory using PACK for derived-types with allocated components Date: Thu, 14 Jan 2010 06:18:00 -0000 [thread overview] Message-ID: <20100114061751.7377.qmail@sourceware.org> (raw) In-Reply-To: <bug-41478-15192@http.gcc.gnu.org/bugzilla/> ------- Comment #27 from pault at gcc dot gnu dot org 2010-01-14 06:17 ------- Subject: Bug 41478 Author: pault Date: Thu Jan 14 06:17:38 2010 New Revision: 155877 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=155877 Log: 2010-01-14 Paul Thomas <pault@gcc.gnu.org> PR fortran/41478 * trans-array.c (duplicate_allocatable): Static version of gfc_duplicate_allocatable with provision to handle scalar components. New boolean argument to switch off call to malloc if true. (gfc_duplicate_allocatable): New function to call above with new argument false. (gfc_copy_allocatable_data): New function to call above with new argument true. (structure_alloc_comps): Do not apply indirect reference to scalar pointers. Add new section to copy allocatable components of arrays. Extend copying of allocatable components to include scalars. (gfc_copy_only_alloc_comp): New function to copy allocatable component derived types, without allocating the base structure. * trans-array.h : Add primitive for gfc_copy_allocatable_data. Add primitive for gfc_copy_only_alloc_comp. * trans-expr.c (gfc_conv_procedure_call): After calls to transformational functions with results that are derived types with allocatable components, copy the components in the result. (gfc_trans_arrayfunc_assign): Deallocate allocatable components of lhs derived types before allocation. 2010-01-14 Paul Thomas <pault@gcc.gnu.org> PR fortran/41478 * gfortran.dg/alloc_comp_scalar_1.f90: New test. * gfortran.dg/alloc_comp_transformational_1.f90: New test. Added: trunk/gcc/testsuite/gfortran.dg/alloc_comp_scalar_1.f90 trunk/gcc/testsuite/gfortran.dg/alloc_comp_transformational_1.f90 Modified: trunk/gcc/fortran/ChangeLog trunk/gcc/fortran/trans-array.c trunk/gcc/fortran/trans-array.h trunk/gcc/fortran/trans-expr.c trunk/gcc/testsuite/ChangeLog -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41478
next prev parent reply other threads:[~2010-01-14 6:18 UTC|newest] Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top 2009-09-26 20:05 [Bug fortran/41478] New: function "pack" causes double free violation reuter at physik dot uni-freiburg dot de 2009-09-26 20:06 ` [Bug fortran/41478] " reuter at physik dot uni-freiburg dot de 2009-09-26 21:16 ` kargl at gcc dot gnu dot org 2009-09-27 0:39 ` jvdelisle at gcc dot gnu dot org 2009-09-27 9:59 ` dominiq at lps dot ens dot fr 2009-09-27 10:36 ` rguenth at gcc dot gnu dot org 2009-09-27 11:45 ` dominiq at lps dot ens dot fr 2009-09-27 13:12 ` rguenth at gcc dot gnu dot org 2009-10-01 21:22 ` [Bug fortran/41478] Corrupted memory using PACK for derived-types with allocated components burnus at gcc dot gnu dot org 2009-10-20 19:56 ` janus at gcc dot gnu dot org 2009-10-20 20:06 ` janus at gcc dot gnu dot org 2009-10-20 20:15 ` janus at gcc dot gnu dot org 2009-10-20 20:54 ` janus at gcc dot gnu dot org 2009-10-21 3:04 ` jvdelisle at gcc dot gnu dot org 2009-12-04 20:34 ` tkoenig at gcc dot gnu dot org 2009-12-04 20:37 ` tkoenig at gcc dot gnu dot org 2009-12-04 21:04 ` tkoenig at gcc dot gnu dot org 2009-12-06 22:57 ` janus at gcc dot gnu dot org 2009-12-13 21:51 ` janus at gcc dot gnu dot org 2010-01-11 6:14 ` pault at gcc dot gnu dot org 2010-01-11 12:30 ` dominiq at lps dot ens dot fr 2010-01-11 12:51 ` pault at gcc dot gnu dot org 2010-01-11 13:06 ` burnus at gcc dot gnu dot org 2010-01-11 13:50 ` dominiq at lps dot ens dot fr 2010-01-11 14:04 ` dominiq at lps dot ens dot fr 2010-01-11 17:51 ` dominiq at lps dot ens dot fr 2010-01-11 18:23 ` pault at gcc dot gnu dot org 2010-01-14 6:18 ` pault at gcc dot gnu dot org [this message] 2010-01-14 6:20 ` pault at gcc dot gnu dot org 2010-02-07 3:55 ` hjl dot tools at gmail dot com
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20100114061751.7377.qmail@sourceware.org \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).