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.
29285 Discussions

Runtime bug involving unlimited polymorphic type.

pwl_b
Novice
472 Views

$ifort --version
ifort (IFORT) 12.1.3 20120212


$ifort -stand f08 bug.f90 -o bug && ./bug
results in:
[plain] key=FOR_DUMP_EXCEPTION_INFOfor_init.cLinux Dump of siginfo struc t: Dump of ucontext struct: FOR_IGNORE_EXCEPTIONSsegmentation fault oc curred2@2@] key= [/plain]
contents of bug.f90:

[fortran]program bug character(len=200) :: name call s1(val = name, key = "z") call s2(val = name, key = "z") contains subroutine s1(val, key) class(*) :: val character(len=*) :: key print *, "key=["//trim(key)//"]" end subroutine s1 subroutine s2(key, val) class(*) :: val character(len=*) :: key print *, "key=["//trim(key)//"]" end subroutine s2 end program bug [/fortran]

Increasing the length of 'name' results in revealing further parts of what seems to be a binary file, Strangely it seems that the order of arguments in a function definition matters, because s2 runs with no problems. I will use it as a temporary solution. Also if name is of type integer or real the strange behavior is not manifested.

0 Kudos
3 Replies
Steven_L_Intel1
Employee
472 Views
How very amusing. It probably relates to the string length hidden argument. Thanks - I will report this to the developers. Issue ID is DPD200180999.
0 Kudos
Steven_L_Intel1
Employee
472 Views
This bug is fixed for a release later this year.
0 Kudos
Steven_L_Intel1
Employee
472 Views

The bug was fixed in the 13.0 compiler.

0 Kudos
Reply