Look at the following program: $ cat sequence.f90 program main type foo sequence character :: a real :: b end type foo type(foo) :: q save q q%b = 2.1 q%a = 'a' end program main $ gfortran -v Reading specs from /home/ig25/lib/gcc/i686-pc-linux-gnu/4.0.0/specs Configured with: ../gcc/configure --prefix=/home/ig25 --enable-languages=c,c++,f95 --disable-shared Thread model: posix gcc version 4.0.0 20041204 (experimental)
$ gfortran -S sequence.f90 $ cat sequence.s .file "sequence.f90" .local q.456 .comm q.456,8,4 .section .rodata .LC1: .ascii "a" .text .globl MAIN__ .type MAIN__, @function MAIN__: pushl %ebp movl %esp, %ebp subl $24, %esp movl $0x40066666, %eax movl %eax, q.456+4 movl $.LC1, 12(%esp) movl $1, 8(%esp) movl $q.456, 4(%esp) movl $1, (%esp) call _gfortran_copy_string leave ret .size MAIN__, .-MAIN__ .ident "GCC: (GNU) 4.0.0 20041204 (experimental)" .section .note.GNU-stack,"",@progbits As you can see from the assembly, there is padding within the sequence type (to the next four bytes). From my understanding of the sequence attribute, this isn't what is intended in this case. -- Summary: padding within a sequence type Product: gcc Version: 4.0.0 Status: UNCONFIRMED Severity: normal Priority: P2 Component: fortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: Thomas dot Koenig at online dot de CC: gcc-bugs at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18850