Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

if ifort 11.1 supports Fortran 2003

pcfresher
Beginner
501 Views
Hi, there

I wonder if ifort 11.1 supports Fortran 2003. For example, I tried to compile the following module file on a supercomputer with ifort 11.1:

module proc_component_example
type t
real :: a
procedure(print_me), pointer, nopass :: proc
end type t
contains
subroutine print_me (arg)
type(t), intent(in) :: arg
write (6,*) arg%a
end subroutine print_me
subroutine print_my_square (arg)
type(t), intent(in) :: arg
write (6,*) arg%a**2
end subroutine print_my_square
end module proc_component_example

but with error message:

test_mod.F90(9): internal error: Please visit 'http://www.intel.com/software/products/support' for assistance.
write (6,*) arg%a
^

does it mean I can not use procedure pointers in derived type?
0 Kudos
5 Replies
TimP
Honored Contributor III
501 Views
Quoting - pcfresher

test_mod.F90(9): internal error: Please visit 'http://www.intel.com/software/products/support' for assistance.
write (6,*) arg%a
^
There shouldn't be such a failure in the current version.
0 Kudos
Steven_L_Intel1
Employee
501 Views
Intel Fortran 11.1 supports most of Fortran 2003, including procedure pointers, but not everything. As Tim says, your source compiles, at least with default options, in the current update 2 (11.1.056).

If you use a feature the compiler doesn't support, you should get a clear error message and not an internal compiler error.
0 Kudos
pcfresher
Beginner
501 Views
Intel Fortran 11.1 supports most of Fortran 2003, including procedure pointers, but not everything. As Tim says, your source compiles, at least with default options, in the current update 2 (11.1.056).

If you use a feature the compiler doesn't support, you should get a clear error message and not an internal compiler error.

Thanks to Tim and Steve. The example is simply copied from "The Fortran 2003 Handbook", page 88. The compiler I used seems to be version 11.1.038, the processor is Intel Xeon CPU.

This morning, I commented the "write" clause in these two subroutines, and compiled using "ifort -c", but with the following error:

gem__lo_decode_locator: locator line sequence number out of range: catastrophic error: **Internal compiler error: abort signal raised** Please report this error along with the circumstances in which it occurred in a Software Problem Report. Note: File and line given may not be explicit cause of this error.

compilation aborted for test_mod.F90 (code 3)

do you have any idea? thank you so much!
0 Kudos
Kevin_D_Intel
Employee
501 Views

The source change has simply aggravated another variant of internal compiler error in the earlier 11.1.038 compiler you are using. Both internal errors are fixed in thelatest 11.1 update 2 (11.1.056) so please upgrade to the newer compiler to avoid these.
0 Kudos
pcfresher
Beginner
501 Views

The source change has simply aggravated another variant of internal compiler error in the earlier 11.1.038 compiler you are using. Both internal errors are fixed in thelatest 11.1 update 2 (11.1.056) so please upgrade to the newer compiler to avoid these.
Thank you, Kevin. I will ask the administrator if it is possible to upgrade to the new version. Thank you!
0 Kudos
Reply