public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "Joost.VandeVondele at pci dot uzh.ch" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/47051] [4.6 Regression] wrong reallocate
Date: Thu, 23 Dec 2010 15:32:00 -0000	[thread overview]
Message-ID: <bug-47051-4-SzKzFXvlMT@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-47051-4@http.gcc.gnu.org/bugzilla/>

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47051

--- Comment #5 from Joost VandeVondele <Joost.VandeVondele at pci dot uzh.ch> 2010-12-23 15:32:14 UTC ---
(In reply to comment #4)
Hi Dominique,

I have read exactly this:

> 3 If the variable is an unallocated allocatable array, expr shall have the same
> rank. If the variable is an allocated allocatable variable, it is deallocated
> if expr is an array of diff\verent shape, any of the corresponding length type
> parameter values of the variable and expr diff\ver, or the variable is
> polymorphic and the dynamic type of the variable and expr diff\ver. 

this section explicitly says it is deallocated only if the shape is different.
In my example, the shape is the same (even if the bounds are different). 

There is thus no need to deallocate a, and reallocate afterwards with the
bounds of b.

Joost


  parent reply	other threads:[~2010-12-23 15:32 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-23 13:27 [Bug fortran/47051] New: " Joost.VandeVondele at pci dot uzh.ch
2010-12-23 13:36 ` [Bug fortran/47051] " dominiq at lps dot ens.fr
2010-12-23 13:47 ` Joost.VandeVondele at pci dot uzh.ch
2010-12-23 13:56 ` Joost.VandeVondele at pci dot uzh.ch
2010-12-23 15:13 ` dominiq at lps dot ens.fr
2010-12-23 15:32 ` Joost.VandeVondele at pci dot uzh.ch [this message]
2010-12-23 17:51 ` pault at gcc dot gnu.org
2010-12-28 16:01 ` rguenth at gcc dot gnu.org
2010-12-29 14:18 ` jakub at gcc dot gnu.org
2010-12-30  3:20 ` jvdelisle at gcc dot gnu.org
2010-12-30 14:43 ` mikael at gcc dot gnu.org
2010-12-30 16:54 ` [Bug fortran/47051] Wrong reallocate tkoenig at gcc dot gnu.org
2011-01-02 11:55 ` [Bug fortran/47051] [4.6 Regression] " Joost.VandeVondele at pci dot uzh.ch
2011-01-02 22:17 ` tkoenig at gcc dot gnu.org
2011-01-04 19:24 ` pault at gcc dot gnu.org
2011-01-09 21:32 ` pault at gcc dot gnu.org
2011-01-10  8:51 ` pault at gcc dot gnu.org
2011-01-11  6:20 ` pault at gcc dot gnu.org
2011-01-11  6:32 ` 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-47051-4-SzKzFXvlMT@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: link
Be 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).