public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/46982] New: SIZE(TRANSFER()) as specification expression
@ 2010-12-16 20:50 burnus at gcc dot gnu.org
  2010-12-17  3:27 ` [Bug fortran/46982] " kargl at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: burnus at gcc dot gnu.org @ 2010-12-16 20:50 UTC (permalink / raw)
  To: gcc-bugs

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

           Summary: SIZE(TRANSFER()) as specification expression
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Keywords: rejects-valid
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: burnus@gcc.gnu.org


Found at
https://www.jiscmail.ac.uk/cgi-bin/webadmin?A1=ind1012&L=COMP-FORTRAN-90#2

Related: (C_)SIZEOF PR 46641

It seems as if the following might be valid - though none of my compiler
supports it. Steve Lionel wrote: "My reading of F2003 suggests that this
qualifies as a legal specification expression."


Example:

module something_mod
  integer, parameter :: dp = selected_real_kind(12)
  type something_type
      real(dp) :: a = 0.0_dp
      real(dp) :: b = 0.0_dp
      real(dp) :: c = 0.0_dp
  end type something_type
  type(something_type),save :: something
end module something_mod

  use something_mod
  integer :: something_array(size(transfer(something,(/0/))))
end


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

end of thread, other threads:[~2013-06-24 18:50 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-12-16 20:50 [Bug fortran/46982] New: SIZE(TRANSFER()) as specification expression burnus at gcc dot gnu.org
2010-12-17  3:27 ` [Bug fortran/46982] " kargl at gcc dot gnu.org
2013-06-23 14:26 ` dominiq at lps dot ens.fr
2013-06-23 22:08 ` anlauf at gmx dot de
2013-06-23 22:19 ` dominiq at lps dot ens.fr
2013-06-24 18:42 ` anlauf at gmx dot de
2013-06-24 18:50 ` dominiq at lps dot ens.fr

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