public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "janus at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/44541] [OOP] wrong code for polymorphic variable with INTENT(OUT)/Alloc w/ MOLD
Date: Mon, 21 Jun 2010 10:18:00 -0000	[thread overview]
Message-ID: <20100621101831.8130.qmail@sourceware.org> (raw)
In-Reply-To: <bug-44541-13404@http.gcc.gnu.org/bugzilla/>



------- Comment #2 from janus at gcc dot gnu dot org  2010-06-21 10:18 -------
My first idea to fix this was to add a new field to the vtabs, let's call it
$def_init, which would be the fourth field in the vtab structure (after $hash,
$size and $extends), and would contain the default initialization values for
the type.

However, this approach does not work, since the field needed for default
initialization would have to be of the derived type which the vtab belongs to.
This however can have different sizes, so that the PPCs in the vtab will not be
aligned any more for extended types, which messes up dynamic dispatch.

Alternatives:
(1) make $def_init a pointer (problem: initialization of $def_init itself)
(2) add standalone variables a la "type_t$def_init" to carry default
initialization for each type
(3) ...?


-- 


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


  parent reply	other threads:[~2010-06-21 10:18 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-15  7:45 [Bug fortran/44541] New: " burnus at gcc dot gnu dot org
2010-06-15 18:41 ` [Bug fortran/44541] " janus at gcc dot gnu dot org
2010-06-21 10:18 ` janus at gcc dot gnu dot org [this message]
2010-08-21 12:51 ` burnus at gcc dot gnu dot org
2010-08-21 15:14 ` janus at gcc dot gnu dot org
2010-08-29 21:10 ` janus at gcc dot gnu dot org
2010-09-01 20:51 ` janus at gcc dot gnu dot org
2010-09-01 21:25 ` burnus at gcc dot gnu dot org
2010-09-02 12:35 ` janus 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=20100621101831.8130.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).