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/50960] [OOP] vtables not marked as constant
Date: Wed, 02 Nov 2011 11:58:00 -0000	[thread overview]
Message-ID: <bug-50960-4-SJOFW4x016@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-50960-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #1 from janus at gcc dot gnu.org 2011-11-02 11:57:44 UTC ---
(In reply to comment #0)
> < richi> and it seems the vtables are not initialized in a way the
>          optimizers could use them
> < richi> they are not constant

Right. I had thought of making them PARAMETERS earlier (to use Fortran
terminology). But in the early implementation this was not possible, since the
PPC members of the vtabs were not initialized statically. Now they are, so this
should work (in principle). I'll try if the following patch survives
regtesting:

Index: gcc/fortran/class.c
===================================================================
--- gcc/fortran/class.c (revision 180713)
+++ gcc/fortran/class.c (working copy)
@@ -424,7 +424,7 @@ gfc_find_derived_vtab (gfc_symbol *derived)
        {
          gfc_get_symbol (name, ns, &vtab);
          vtab->ts.type = BT_DERIVED;
-         if (gfc_add_flavor (&vtab->attr, FL_VARIABLE, NULL,
+         if (gfc_add_flavor (&vtab->attr, FL_PARAMETER, NULL,
                              &gfc_current_locus) == FAILURE)
            goto cleanup;
          vtab->attr.target = 1;


  reply	other threads:[~2011-11-02 11:58 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-02 10:43 [Bug fortran/50960] New: " burnus at gcc dot gnu.org
2011-11-02 11:58 ` janus at gcc dot gnu.org [this message]
2011-11-02 14:32 ` [Bug fortran/50960] " rguenth at gcc dot gnu.org
2011-11-02 14:38 ` rguenth at gcc dot gnu.org
2011-11-02 14:40 ` rguenth at gcc dot gnu.org
2011-11-02 14:58 ` burnus at gcc dot gnu.org
2011-11-02 15:08 ` janus at gcc dot gnu.org
2011-11-02 15:16 ` rguenth at gcc dot gnu.org
2011-11-02 16:45 ` janus at gcc dot gnu.org
2011-11-02 18:50 ` janus at gcc dot gnu.org
2011-11-02 20:11 ` janus at gcc dot gnu.org
2011-11-02 21:17 ` janus at gcc dot gnu.org
2011-11-03 12:07 ` janus at gcc dot gnu.org
2011-11-03 14:04 ` burnus at gcc dot gnu.org
2011-11-03 14:18 ` rguenth at gcc dot gnu.org
2011-11-03 14:24 ` burnus at gcc dot gnu.org
2011-11-03 14:30 ` rguenth at gcc dot gnu.org
2011-11-03 14:34 ` rguenth at gcc dot gnu.org
2011-11-03 22:33 ` burnus at gcc dot gnu.org
2011-11-07  7:36 ` burnus at gcc dot gnu.org
2011-11-07 22:59 ` janus at gcc dot gnu.org
2011-11-09  9:52 ` janus at gcc dot gnu.org
2011-11-09 16:07 ` janus at gcc dot gnu.org
2011-11-09 16:13 ` 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-50960-4-SJOFW4x016@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).