Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.

allocatable in derived type

tonio
Beginner
596 Views

Hello,

my code works ok with ifort 9.0.021.
I've just installed 9.0.031 and it no more works.
I've found what was going wrong, which can be illustrated with this little example :

program test

type t
real*8, allocatable :: d(:,:)
end type t

type(t) :: tab(2)

call alloc(tab)

contains

subroutine alloc(tab)

type(t), intent(out) :: tab(:)

end subroutine alloc

end program test


I get a segmentation fault.
If
type(t), intent(out) :: tab(:)
is changed to
type(t), intent(inout) :: tab(:)
or
type(t), intent(out) :: tab(2)
it works fine.

What's going on ?
Thanks.

0 Kudos
3 Replies
Steven_L_Intel1
Employee
596 Views
With INTENT(OUT), the compiler is supposed to ensure that all of the allocatable components are deallocated. It is making a mistake apparently while doing so. I have passed this on to the developers. If you choose to file a support request, please reference T65004.
0 Kudos
tonio
Beginner
596 Views
Thank you.
0 Kudos
Steven_L_Intel1
Employee
596 Views
This bug has been fixed for a future update (late May at the earliest.)
0 Kudos
Reply