public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "fxcoudert at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/31218] ICE on valid code with gfortran
Date: Fri, 04 May 2007 11:31:00 -0000	[thread overview]
Message-ID: <20070504113141.24383.qmail@sourceware.org> (raw)
In-Reply-To: <bug-31218-6642@http.gcc.gnu.org/bugzilla/>



------- Comment #5 from fxcoudert at gcc dot gnu dot org  2007-05-04 12:31 -------
RESHAPE is not simplified, because "x" has type EXPR_CONSTANT (scalar constant)
which is not accepted by the simplification routine gfc_simplify_reshape,
because it wants arguments to be EXPR_ARRAY (ie array constructor). Thus, the
following code fails to compile:
  integer, parameter :: x(1) = 1, y(1) = reshape(x,(/1/))
  print *, y
  end
while that other one works fine:
  integer, parameter :: x(1) = (/1/), y(1) = reshape(x,(/1/))
  print *, y
  end

I don't know if it's OK for x to have type EXPR_CONSTANT, but I think it is. In
that case, gfc_simplify_reshape should be modified to account for this
possibility.


-- 

fxcoudert at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |fxcoudert at gcc dot gnu dot
                   |                            |org
   Last reconfirmed|2007-03-17 15:42:32         |2007-05-04 12:31:41
               date|                            |


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


  parent reply	other threads:[~2007-05-04 11:31 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-16 11:45 [Bug fortran/31218] New: " jv244 at cam dot ac dot uk
2007-03-17 15:42 ` [Bug fortran/31218] " tkoenig at gcc dot gnu dot org
2007-04-06 22:06 ` brooks at gcc dot gnu dot org
2007-04-16 13:15 ` tobi at gcc dot gnu dot org
2007-05-04  1:48 ` jvdelisle at gcc dot gnu dot org
2007-05-04 11:31 ` fxcoudert at gcc dot gnu dot org [this message]
2007-05-30 13:23 ` pault at gcc dot gnu dot org
2007-06-14 12:13 ` pault at gcc dot gnu dot 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=20070504113141.24383.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: 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).