Runtime bug involving unlimited polymorphic type.

Runtime bug involving unlimited polymorphic type.

Bild des Benutzers pwl_b

$ifort --version
ifort (IFORT) 12.1.3 20120212

$ifort -stand f08 bug.f90 -o bug && ./bug
results in:

 key=[z]FOR_DUMP_EXCEPTION_INFOfor_init.cLinux Dump of siginfo struc t: Dump of ucontext struct: FOR_IGNORE_EXCEPTIONSsegmentation fault oc curred2@2@] key=[z] 

contents of bug.f90:

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 

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.

4 Beiträge / 0 neu
Letzter Beitrag
Nähere Informationen zur Compiler-Optimierung finden Sie in unserem Optimierungshinweis.
Bild des Benutzers Steve Lionel (Intel)

How very amusing. It probably relates to the string length hidden argument. Thanks - I will report this to the developers. Issue ID is DPD200180999.

Steve
Bild des Benutzers Steve Lionel (Intel)

This bug is fixed for a release later this year.

Steve
Bild des Benutzers Steve Lionel (Intel)

The bug was fixed in the 13.0 compiler.

Steve

Melden Sie sich an, um einen Kommentar zu hinterlassen.