- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
$ifort --version
ifort (IFORT) 12.1.3 20120212
$ifort -stand f08 bug.f90 -o bug && ./bug
results in:
[plain] key=
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.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The bug was fixed in the 13.0 compiler.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page