- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am running Fortran 2024.1 on Visual Studio 2022 in Windows. When I run the following code using the IFX compiler in debug mode (or release with debug on),
real(kind=8), allocatable :: a(:)
integer :: b, c, d
b = 0
c = 0
d = 0
if (allocated(a)) then
b = 1
c = 2
d = 3
deallocate (a)
end if
end
The code will step into the IF statement and break at the DEALLOCATE statement (no matter where it is located in the IF conditional) but not make any changes. Making the next step will step out of the IF conditional. No changes to b, c, d, or error in trying to deallocate an unallocated array.
If I use the IFORT compiler, the code will run as expected, i.e., jump over the IF since the array A is unallocated.
This behavior is the same whether A is integer, real or complex.
I am trying to find a memory error/leak in my large code and I had thought I found the problem until I tested this with a small sample code.
I assume this is a bug in the IFX compiler?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I cannot reproduce that. Could you please also check with 2024.2.1?
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
Hi TobiasK!
I do not have admin rights on my computer as my company is very strict on what software can be installed. I will try to get Fortran, version 2024.2.1 but not sure I will be able to.
Thank you so much for checking!
David

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