public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "burnus at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/55824] [OOP] ICE with ALLOCATE and SOURCE= TRANSPOSE/RESHAPE
Date: Sat, 29 Dec 2012 10:13:00 -0000	[thread overview]
Message-ID: <bug-55824-4-NefqbH2Tpn@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-55824-4@http.gcc.gnu.org/bugzilla/>


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

--- Comment #2 from Tobias Burnus <burnus at gcc dot gnu.org> 2012-12-29 10:12:46 UTC ---
>From trans-stmt.c's gfc_trans_allocate

       /* Evaluate expr3 just once if not a variable.  */
...
           && code->expr3->ts.type == BT_CLASS
           && code->expr3->expr_type != EXPR_VARIABLE)
         ...
         classexpr = gfc_evaluate_now (classexpr, &se.pre);

I think we should handle intrinsic functions in a special way as they never
change the actual type BT_CLASS; thus, the actual type can be taken from the
actual argument of RESHAPE/TRANSPOSE. (Though, check that "transfer(f())"
doesn't evaluate "f" twice.)

(If one skips that if block, the ICE occurs in gfc_array_allocate when
obtaining the size via gfc_array_init_size.)


  parent reply	other threads:[~2012-12-29 10:13 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-28 16:50 [Bug fortran/55824] New: " burnus at gcc dot gnu.org
2012-12-28 23:34 ` [Bug fortran/55824] " burnus at gcc dot gnu.org
2012-12-29 10:13 ` burnus at gcc dot gnu.org [this message]
2013-01-08 12:37 ` dominiq at lps dot ens.fr
2015-06-30  0:23 ` damian at sourceryinstitute dot org
2015-06-30  0:24 ` damian at sourceryinstitute dot org
2015-10-29 12:32 ` dominiq at lps dot ens.fr
2021-12-17 21:58 ` pinskia at gcc dot gnu.org
2023-11-29 10:47 ` 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-55824-4-NefqbH2Tpn@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).