public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "janus at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/50585] [4.6/4.7 Regression] ICE with assumed length character array argument
Date: Sat, 01 Oct 2011 10:10:00 -0000	[thread overview]
Message-ID: <bug-50585-4-8T7Y41yUOZ@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-50585-4@http.gcc.gnu.org/bugzilla/>

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

janus at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2011-10-01
     Ever Confirmed|0                           |1

--- Comment #3 from janus at gcc dot gnu.org 2011-10-01 10:09:56 UTC ---
Simple fix:

Index: gcc/fortran/interface.c
===================================================================
--- gcc/fortran/interface.c     (revision 179412)
+++ gcc/fortran/interface.c     (working copy)
@@ -1959,7 +1959,7 @@
            {
              /* The string length is the substring length.
                 Set now to full string length.  */
-             if (ref->u.ss.length == NULL
+             if (!ref->u.ss.length || !ref->u.ss.length->length
                  || ref->u.ss.length->length->expr_type != EXPR_CONSTANT)
                return 0;


  parent reply	other threads:[~2011-10-01 10:10 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-01  7:36 [Bug fortran/50585] New: " sgm at objexx dot com
2011-10-01  9:56 ` [Bug fortran/50585] [4.6/4.7 Regression] " janus at gcc dot gnu.org
2011-10-01 10:04 ` janus at gcc dot gnu.org
2011-10-01 10:10 ` janus at gcc dot gnu.org [this message]
2011-10-01 10:15 ` dominiq at lps dot ens.fr
2011-10-01 10:25 ` janus at gcc dot gnu.org
2011-10-01 11:25 ` janus at gcc dot gnu.org
2011-10-01 11:42 ` janus at gcc dot gnu.org
2011-10-01 12:13 ` janus at gcc dot gnu.org
2011-10-07 21:01 ` janus at gcc dot gnu.org
2011-10-07 21:24 ` janus 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-50585-4-8T7Y41yUOZ@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).