public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/60357] New: structure constructor with unspecified values for allocatable components
@ 2014-02-27 14:56 antony at cosmologist dot info
  2014-02-27 22:19 ` [Bug fortran/60357] [F08] " janus at gcc dot gnu.org
                   ` (12 more replies)
  0 siblings, 13 replies; 14+ messages in thread
From: antony at cosmologist dot info @ 2014-02-27 14:56 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 60357
           Summary: structure constructor with unspecified values for
                    allocatable components
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: antony at cosmologist dot info

This valid F2008 code is rejected:


    module testmod
    Type A
        integer :: X = 1
        integer, allocatable :: y 
    end type A
    end module

    program testerprog
    use testmod
    Type(A) :: Me = A(X=1)

    end program


Compiler error is:

Type(A) :: Me = A(X=1)
               1
Error: No initializer for component 'y' given in the structure constructor at
(1)!

However initialization statements are not required for allocatable components.


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

end of thread, other threads:[~2015-01-26 10:57 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-27 14:56 [Bug fortran/60357] New: structure constructor with unspecified values for allocatable components antony at cosmologist dot info
2014-02-27 22:19 ` [Bug fortran/60357] [F08] " janus at gcc dot gnu.org
2014-02-28 17:35 ` janus at gcc dot gnu.org
2014-08-12 15:15 ` dominiq at lps dot ens.fr
2014-12-21 14:14 ` dominiq at lps dot ens.fr
2014-12-23 23:46 ` janus at gcc dot gnu.org
2014-12-29 10:46 ` janus at gcc dot gnu.org
2014-12-29 10:55 ` janus at gcc dot gnu.org
2014-12-29 14:59 ` vehre at gmx dot de
2014-12-29 16:42 ` janus at gcc dot gnu.org
2014-12-29 17:37 ` vehre at gmx dot de
2014-12-29 17:37 ` vehre at gmx dot de
2015-01-17 18:09 ` pault at gcc dot gnu.org
2015-01-26 10:57 ` vehre at gcc dot gnu.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).