- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
[fortran]PROGRAM KRBUG
implicit none
integer :: IERR
call chk('MKS',iErr)
END PROGRAM KRBUG
SUBROUTINE chk(str,isError)
implicit none
integer :: isERROR
character(len=*) :: str
character(len=len(str)) :: strLower
call Lcase(str,strLower)
write(*,10)strLower
return
10 format(1x,'|',A,'|')
END SUBROUTINE chk
SUBROUTINE Lcase (str, strLower)
implicit none
character(len=*), intent(in) :: str
character(len=len(str)), intent(out) :: strLower
integer :: i
strLower = str
do i = 1, len_trim(str)
if (lge(str(i:i), 'A') .and. lle(str(i:i), 'Z')) &
strLower(i:i) = achar( iachar(str(i:i)) + 32 )
enddo
return
END SUBROUTINE Lcase
[/fortran]
However, with both options chosen (and -traceback added to show line-numbers), with 11.1.067 (Windows XP), 11.1.073 (Linux IA32, Intel64) and 11.1.072 (Linux IA64), it produces a bogus run-time error.
[bash]forrtl: severe (408): fort: (4): Variable STRLOWER has substring ending point 2 which is greater than the variThe bug disappears if the subroutines are converted to internal subprograms.
able length of 1
Image PC Routine Line Source
kr.exe 00449E0A Unknown Unknown Unknown
kr.exe 00446FF8 Unknown Unknown Unknown
kr.exe 00407BF0 Unknown Unknown Unknown
kr.exe 00408211 Unknown Unknown Unknown
kr.exe 00401248 _LCASE 33 kr.f90
kr.exe 0040106D _MAIN__ 6 kr.f90
kr.exe 0044FDB3 Unknown Unknown Unknown
kr.exe 004345AF Unknown Unknown Unknown
kernel32.dll 7C817077 Unknown Unknown Unknown[/bash]
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This has been reported tothe compiler developersas defect #DPD200160916. I will keep this thread updated with any developments.
The last good compiler is circa late November 2009:
> ifort -V
Intel Fortran Intel 64 Compiler Professional for applications running on Intel 64, Version 11.1 Build 20091130 Package ID: l_cprof_p_11.1.064
> ifort -O0 -warn all -check all T77560.f90 -traceback && ./a.out
T77560.f90(10): remark #7712: This variable has not been used. [ISERROR]
SUBROUTINE chk(str,isError)
-------------------^
|mks|
>
Patrick KennedyIntel Developer Support
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You can workaround the issue by compiling with '-warn all -check all' and adding 'warn -nointerfaces -check nobounds' to exclude only the defective combination (and still get the benefit of all the other diagnostics):
$ ifort -V
Intel Fortran Intel 64 Compiler XE for applications running on Intel 64, Version 12.0.0.066 Build 20100825
$ ifort -warn all -warn nointerfaces -check all -check nobounds T77560.f90 && ./a.out
T77560.f90(10): remark #7712: This variable has not been used. [ISERROR]
SUBROUTINE chk(str,isError)
-------------------^
|mks|
$
Patrick Kennedy
Intel Developer Support
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Your workaround recommendation is going to help, too.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
$ ifort -V
Intel Fortran Intel 64 Compiler XE for applications running on Intel 64, Version 12.0.1.107 Build 20101116
Copyright (C) 1985-2010 Intel Corporation. All rights reserved.
$ ifort -O0 -warn all -check all T77560.f90 -traceback && ./a.out
T77560.f90(10): remark #7712: This variable has not been used. [ISERROR]
SUBROUTINE chk(str,isError)
-------------------^
|mks|
$
As it was a Fortran front-end defect, all platforms were affected. The packages with the fixes are:
w_fcompxe_2011.1.127 (Windows*)
l_fcompxe_2011.1.107 (Linux*)
m_fcompxe_2011.1.122 (Mac OS* X)
Patrick Kennedy
Intel Developer Support
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page