public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/43185]  New: [F2008] Implicit SAVE in MODULEs
@ 2010-02-25 23:57 burnus at gcc dot gnu dot org
  2010-02-26  7:36 ` [Bug fortran/43185] " burnus at gcc dot gnu dot org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: burnus at gcc dot gnu dot org @ 2010-02-25 23:57 UTC (permalink / raw)
  To: gcc-bugs

"A variable, common block, or procedure pointer declared in the scoping unit of
a main program, module, or submodule implicitly has the SAVE attribute, which
may be con\ffirmed by explicit specification." (F2008, 5.3.16 SAVE attribute).

In terms of the code generated, this already happens: The variables end up in
static memory. In the most cases, it also makes no difference in diagnostics;
however, there is one case.

Currently, the following program fails with
Error: Object 'a' at (1) must have the SAVE attribute for default
initialization of a component

module m
  type t
    integer :: a = 5
  end type t
  type(t) :: a
end module m


-- 
           Summary: [F2008] Implicit SAVE in MODULEs
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: burnus at gcc dot gnu dot org


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


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2010-02-27 17:26 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-02-25 23:57 [Bug fortran/43185] New: [F2008] Implicit SAVE in MODULEs burnus at gcc dot gnu dot org
2010-02-26  7:36 ` [Bug fortran/43185] " burnus at gcc dot gnu dot org
2010-02-26 22:26 ` burnus at gcc dot gnu dot org
2010-02-26 22:52 ` burnus at gcc dot gnu dot org
2010-02-27 17:25 ` burnus at gcc dot gnu dot org
2010-02-27 17:26 ` burnus at gcc dot gnu dot org

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).