Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29065 Discussions

OneAPI 2024.2.0: ifx with -heap-arrays deallocation bug with temporary lists

Maranda
Beginner
394 Views

I have discovered a bug with the OneAPI 2024.2.0 compiler, which occurs only on the ifx compiler and only when compiled with -heap-arrays flag.

If you have a type that contains an allocatable array, like so:

type Test
   integer(4), allocatable :: List(:)
endtype

and then pass a temporary list of those types into a subroutine:

call DoSomething([Test1, Test2])

you end up with a segfault upon exiting that subroutine.

Running it through gdb specifically points towards `do_deallocate_all` from the OneAPI 2024.2.0 compiler as the culprit.

The bug doesn't happen if you use ifort included with OneAPI 2024.2.0. It also doesn't happen if you use ifx but take out the heap-array flag.

It's just broken if you use ifx with the heap-array flag.

Attached is a dummy Fortran code I made while I was debugging the issue.

Labels (3)
0 Kudos
1 Solution
JFH
New Contributor I
298 Views

I'm also on a Linux machine. The program was OK with ifx 2025.1.

View solution in original post

3 Replies
Maranda
Beginner
387 Views

Forgot to mention: I was on a Linux machine.

0 Kudos
JFH
New Contributor I
299 Views

I'm also on a Linux machine. The program was OK with ifx 2025.1.

Maranda
Beginner
149 Views

Thanks! Using the newer compiler does seem to solve that particular issue

Reply