gfortran: alignment data in derived type

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Question is about GFortran compiler behaviour. I use derived type in my
project with declaration like below:

Type :: mytype

    Integer*4 :: ivar         ! the initial point with address "0"
    Real*4 :: farray(20)   ! an array with adresses from "4" to "80"
    .... 4-byte pad
    Integer*8 :: livar        ! the adress of integer*8 variable 88 in this
case

end  Type  mytype

But if change my declaration in such way i get:

Type :: mytype
    ! add above three variables
    Logical*1 :: key1,key2 ! initial point here  with address "0"
    Integer*2 :: i2testvar !  adress 2 as expected
    Integer*4 :: ivar         ! address "4"
    Real*4 :: farray(20)   ! an array with adresses from "8" to "84"
    .... 0-byte pad
    Integer*8 :: livar        ! the adress of integer*8 variable 88 the
same with above declaration

end  Type  mytype

Question: Could I manage the compiler alignment behaviour like in COMMON
Block in old style Fortran and where have been lost the padding?
Best regards and would like get any answer on my question.



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux