public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "pault at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/48705] [OOP] ALLOCATE with non-trivial SOURCE Date: Fri, 27 Jan 2012 10:13:00 -0000 [thread overview] Message-ID: <bug-48705-4-VxFoTc9ZVg@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-48705-4@http.gcc.gnu.org/bugzilla/> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48705 --- Comment #3 from Paul Thomas <pault at gcc dot gnu.org> 2012-01-27 10:06:03 UTC --- Author: pault Date: Fri Jan 27 10:05:56 2012 New Revision: 183613 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=183613 Log: 2012-01-27 Paul Thomas <pault@gcc.gnu.org> Tobias Burnus <burnus@gcc.gnu.org> PR fortran/48705 PR fortran/51870 PR fortran/51943 PR fortran/51946 * trans-array.c (gfc_array_init_size): Add two extra arguments to convey the dynamic element size of a calls object and to return the number of elements that have been allocated. (gfc_array_allocate): Add the same arguments and use them to call gfc_array_init_size. Before the allocation dereference the data pointer, if necessary. Set the allocated array to zero if the class element size or expr3 are non-null. * trans-expr.c (gfc_conv_class_to_class): Give this function global scope. (get_class_array_ref): New function. (gfc_copy_class_to_class): New function. * trans-array.h : Update prototype for gfc_array_allocate. * trans-stmt.c (gfc_trans_allocate): For non-variable class STATUS expressions extract the class object and the dynamic element size. Use the latter to call gfc_array_allocate and the former for setting the vptr and, via gfc_copy_class_to_clasfc_cs, to copy to the allocated data. * trans.h : Prototypes for gfc_get_class_array_ref, gfc_copy_class_to_class and gfc_conv_class_to_class. 2012-01-27 Paul Thomas <pault@gcc.gnu.org> Tobias Burnus <burnus@gcc.gnu.org> PR fortran/48705 * gfortran.dg/class_allocate_11.f03: New. PR fortran/51870 PR fortran/51943 PR fortran/51946 * gfortran.dg/class_allocate_7.f03: New. * gfortran.dg/class_allocate_8.f03: New. * gfortran.dg/class_allocate_9.f03: New. * gfortran.dg/class_allocate_10.f03: New. Added: trunk/gcc/testsuite/gfortran.dg/class_allocate_10.f03 trunk/gcc/testsuite/gfortran.dg/class_allocate_11.f03 trunk/gcc/testsuite/gfortran.dg/class_allocate_7.f03 trunk/gcc/testsuite/gfortran.dg/class_allocate_8.f03 trunk/gcc/testsuite/gfortran.dg/class_allocate_9.f03 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/fortran/trans-stmt.c trunk/gcc/fortran/trans.h trunk/gcc/testsuite/ChangeLog
next prev parent reply other threads:[~2012-01-27 10:09 UTC|newest] Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top 2011-04-20 19:35 [Bug fortran/48705] New: [OOP] ICE with generic TBP burnus at gcc dot gnu.org 2011-05-15 13:25 ` [Bug fortran/48705] [OOP] ALLOCATE with non-trivial SOURCE janus at gcc dot gnu.org 2011-05-15 18:17 ` janus at gcc dot gnu.org 2012-01-27 10:13 ` pault at gcc dot gnu.org [this message] 2012-01-27 10:16 ` pault at gcc dot gnu.org
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=bug-48705-4-VxFoTc9ZVg@http.gcc.gnu.org/bugzilla/ \ --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).