This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/58793] New: Wrong storage_size of class(*) dummy argument with complex actual


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]