public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/58793] New: Wrong storage_size of class(*) dummy argument with complex actual
@ 2013-10-18 18:18 vladimir.fuka at gmail dot com
  2013-10-18 19:17 ` [Bug fortran/58793] " burnus at gcc dot gnu.org
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: vladimir.fuka at gmail dot com @ 2013-10-18 18:18 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 58793
           Summary: Wrong storage_size of class(*) dummy argument with
                    complex actual
           Product: gcc
           Version: 4.8.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: vladimir.fuka at gmail dot com

Complex variable has storage size of only real a variable when passed as
class(*).

module m
contains
 subroutine s(o)
    class(*) :: o

    write (*,*) storage_size(o)
    select type (o)
      type is (complex)
        print *,storage_size(o)
      type is (complex(8))
        print *,storage_size(o)
      type is (complex(16))
        print *,storage_size(o)
    end select
  end 
end

program p
 use m
 call s((1._4,2._4))
 call s((1._8,2._8))
 call s((1._16,2._16))
end

gcc version 4.8.2 20131003


Expected output:
          64
          64
         128
         128
         256
         256


Actual output:
          32
          64
          64
         128
         128
         256


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

end of thread, other threads:[~2014-03-17  9:25 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-10-18 18:18 [Bug fortran/58793] New: Wrong storage_size of class(*) dummy argument with complex actual vladimir.fuka at gmail dot com
2013-10-18 19:17 ` [Bug fortran/58793] " burnus at gcc dot gnu.org
2013-10-18 19:40 ` [Bug fortran/58793] Wrong value for _vtab for intrinsic types with CLASS(*): storage_size of class(*) gives wrong result burnus at gcc dot gnu.org
2013-10-19  5:41 ` burnus at gcc dot gnu.org
2013-10-19 22:04 ` pault at gcc dot gnu.org
2013-10-23  5:44 ` burnus at gcc dot gnu.org
2013-10-23  6:01 ` burnus at gcc dot gnu.org
2013-10-29 20:45 ` pault at gcc dot gnu.org
2013-10-29 20:48 ` pault at gcc dot gnu.org
2014-03-17  9:25 ` schwab@linux-m68k.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).