public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "toon at moene dot indiv dot nluug dot nl" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/30660] [4.2 and 4.1 only] Allocatable components of a derived type "require" the SAVE attribute.
Date: Sun, 04 Feb 2007 13:17:00 -0000	[thread overview]
Message-ID: <20070204131724.11219.qmail@sourceware.org> (raw)
In-Reply-To: <bug-30660-109@http.gcc.gnu.org/bugzilla/>



------- Comment #5 from toon at moene dot indiv dot nluug dot nl  2007-02-04 13:17 -------
It's not completely fixed yet, though.

The following:

MODULE types_m

  TYPE coord_t
    INTEGER ncord
    REAL,ALLOCATABLE,DIMENSION(:) :: x, y
  END TYPE

  TYPE grib_t
    INTEGER ksec0(2), ksec1(64), ksec2(64), ksec3(2), ksec4(64)
    REAL psec2(512), psec3(3)
    LOGICAL packed ! if packed then the data are stored in g_work
    INTEGER npts
    REAL,DIMENSION(:),ALLOCATABLE :: vdata
    TYPE(coord_t) coords
  END TYPE

END MODULE

MODULE globals_m
  USE types_m
  TYPE(grib_t) g_dest           ! output field
END MODULE

still fails with:

globals.f90:21.21:

  TYPE(grib_t) g_dest  ! output field
                    1
Error: Object 'g_dest' at (1) must have the SAVE attribute for default
initialization of a component

probably because of the nested nature of the allocatable component in coord_t.

Hope this helps.


-- 


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


  parent reply	other threads:[~2007-02-04 13:17 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-31 21:34 [Bug fortran/30660] New: " toon at moene dot indiv dot nluug dot nl
2007-01-31 21:38 ` [Bug fortran/30660] " toon at moene dot indiv dot nluug dot nl
2007-02-02 13:14 ` pault at gcc dot gnu dot org
2007-02-02 16:15 ` pault at gcc dot gnu dot org
2007-02-03 12:46 ` fxcoudert at gcc dot gnu dot org
2007-02-03 13:39 ` pault at gcc dot gnu dot org
2007-02-04 13:17 ` toon at moene dot indiv dot nluug dot nl [this message]
2007-02-05  9:37 ` [Bug fortran/30660] [4.2 and 4.1 only] " paulthomas2 at wanadoo dot fr
2007-02-11  9:57 ` pault at gcc dot gnu dot org
2007-02-17 22:42 ` pault at gcc dot gnu dot org
2007-02-19 21:02 ` mmitchel at gcc dot gnu dot org
2007-02-22 22:10 ` patchapp at dberlin dot org
2007-02-23 16:35 ` burnus at gcc dot gnu dot org
2007-03-01  9:44 ` [Bug fortran/30660] [4.2 " burnus at gcc dot gnu dot org
2007-03-01  9:45 ` [Bug fortran/30660] " burnus 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=20070204131724.11219.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).