- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I downloaded and installed the latest compiler today and did a trial build of a reasonably large application. It did build and run OK previously on IFX but because of debugger issues we have not switched from IFORT. It now throw and exception in the debugger with the latest IFX because 'array index 1 was xxxxxxxx ( a very large number) which is bigger than the upper bound of 3'. I made a simple example shown below. This example throws an exception on line 16 but in this case gives no further information. The array index l1 = 1 and everything look fine in the debugger if you break prior to the exception. If the assignment is element by element rather than a slice it runs ok.
module mymod
implicit none(type, external)
integer :: ians(3,100)
interface
module subroutine test1()
end subroutine test1
end interface
end module mymod
submodule ( mymod ) mymod1
implicit none(type, external)
contains
module subroutine test1()
integer :: l1
do l1 = 1 , 100
ians(:,l1) = [ l1, l1+1, l1+2 ]
!ians(1,l1) = l1
!ians(2,l1) = l1+1
!ians(3,l1) = l1+2
enddo
end subroutine test1
end submodule mymod1
program test
use mymod, only: test1
implicit none(type, external)
call test1()
end program test
The compile options are:
/nologo /debug:full /Od /module:"x64\Debug\\" /object:"x64\Debug\\" /traceback /check:bounds /check:stack /libs:dll /threads /dbglibs /c
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, it fails in the debug config on Windows. I have escalated this report to our compiler engineering. Thank you for your report.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Perhaps I should have added I think this must be a compiler bug because the indexing used for a slice is outside the user control so that must be a problem in the compiler tool chain. Additionally of one makes the arrays allocatable and allocates to the size used the problem goes away.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I compiled on linux with
ifx -debug full -O0 -traceback -check bounds -check stack -threads a.f90
I didn't get any error when compiling or running the file.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Interesting I get:
forrtl: severe (408): fort: (11): Subscript #1 of the array IANS has value 0 which is less than the lower bound of 1
Image PC Routine Line Source
Console3.exe 00007FF7B6C611A6 TEST1 16 ifxdebugtest.f90
Console3.exe 00007FF7B6C6128B TEST 27 ifxdebugtest.f90
Console3.exe 00007FF7B6C612BB Unknown Unknown Unknown
Console3.exe 00007FF7B6C617C9 Unknown Unknown Unknown
Console3.exe 00007FF7B6C616EE Unknown Unknown Unknown
Console3.exe 00007FF7B6C615AE Unknown Unknown Unknown
Console3.exe 00007FF7B6C6183E Unknown Unknown Unknown
KERNEL32.DLL 00007FF9409C257D Unknown Unknown Unknown
ntdll.dll 00007FF942CCAF28 Unknown Unknown Unknown
That is Windows which might be the difference. That is a debug build ruin in the debugger.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It runs OK without /check:bounds it seems. Defo feels a lot like a compiler bug.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, it fails in the debug config on Windows. I have escalated this report to our compiler engineering. Thank you for your report.
![](/skins/images/7B0AB6865064EAE32B30EC9A4E94B48A/responsive_peak/images/icon_anonymous_message.png)
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page