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/50227] [4.7 Regression] [OOP] ICE-on-valid with allocatable class variable
Date: Mon, 29 Aug 2011 20:37:00 -0000	[thread overview]
Message-ID: <bug-50227-4-sGoZ8jxNGO@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-50227-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #11 from janus at gcc dot gnu.org 2011-08-29 19:28:42 UTC ---
Well, the obvious patch (based on Tobias' debugging) would be:


Index: gcc/fortran/trans-types.c
===================================================================
--- gcc/fortran/trans-types.c   (revision 178253)
+++ gcc/fortran/trans-types.c   (working copy)
@@ -2109,7 +2109,8 @@ gfc_sym_type (gfc_symbol * sym)
     {
       /* We must use pointer types for potentially absent variables.  The
         optimizers assume a reference type argument is never NULL.  */
-      if (sym->attr.optional || sym->ns->proc_name->attr.entry_master)
+      if (sym->attr.optional
+         || (sym->ns->proc_name && sym->ns->proc_name->attr.entry_master))
        type = build_pointer_type (type);
       else
        {


And indeed it seems to fix the segfault. However, I still don't really see the
connection to r171654.


  parent reply	other threads:[~2011-08-29 19:29 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-29 16:11 [Bug fortran/50227] New: ICE on valid with allocatable class component abenson at caltech dot edu
2011-08-29 16:14 ` [Bug fortran/50227] " abenson at caltech dot edu
2011-08-29 16:15 ` [Bug fortran/50227] [4.7 Regression] " dominiq at lps dot ens.fr
2011-08-29 16:15 ` [Bug fortran/50227] " abenson at caltech dot edu
2011-08-29 16:27 ` [Bug fortran/50227] [4.7 Regression] [OOP] " janus at gcc dot gnu.org
2011-08-29 16:36 ` janus at gcc dot gnu.org
2011-08-29 17:34 ` dominiq at lps dot ens.fr
2011-08-29 17:36 ` [Bug fortran/50227] [4.7 Regression] [OOP] ICE-on-valid with allocatable class variable janus at gcc dot gnu.org
2011-08-29 17:39 ` dominiq at lps dot ens.fr
2011-08-29 17:41 ` janus at gcc dot gnu.org
2011-08-29 18:03 ` dominiq at lps dot ens.fr
2011-08-29 18:23 ` dominiq at lps dot ens.fr
2011-08-29 19:29 ` janus at gcc dot gnu.org
2011-08-29 20:37 ` janus at gcc dot gnu.org [this message]
2011-08-30 17:49 ` janus at gcc dot gnu.org
2011-08-30 17:54 ` dominiq at lps dot ens.fr
2011-08-31 11:35 ` janus at gcc dot gnu.org
2011-09-04 10:46 ` janus at gcc dot gnu.org
2011-09-04 10:49 ` janus at gcc dot gnu.org
2011-09-04 10:50 ` 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-50227-4-sGoZ8jxNGO@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).