- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Helle everyone,
I'm having a migration problem from CVF to IVF of a project in a quite old and poor-quality Fortran code.
Problem is sometimes, the index during runtime exceeds the size of the array.
[fortran]
subroutine suba (val) !assuming val=20
implicit none
integer arr(10), val, i
do i=1, val
print*, arr(i) !i will have eventually have the value 11...
enddo
end
[/fortran]
Seeing this, CVF would not crash. Wow, I know ! The value printed would be a memory location corresponding at something else than arr, but that's not the point !
Unfortunately for me, IVF does crash everytime it sees this (and so do I). But is there any way (options ?) to make IVF behaving like CVF for this project ?
I'm aware that results can be void, but I just want the project not to crash on such errors.
Thanks a lot for your help
Cheers,
Renaud
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
CVF would certainly give you an error for this, if you enabled bounds checking. If you didn't enable it, you wouldn't. Same goes for Intel Fortran. You can turn off bounds checking if you want. As with CVF, it is on by default in a Debug configuration, off in Release.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hey Steve,
Than you very much for your answer. I didn't know about this option concerning bounds checking. Turns out that it was disabled in my CVF project and enabled in IVF
Now that's working
Renaud
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page