Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
Welcome to the Intel Community. If you get an answer you like, please mark it as an Accepted Solution to help others. Thank you!
26747 Discussions

Problem in ifort 19.1.2.254 with arr = arr(v)

ccorrado
Beginner
299 Views

It seems that the last versions of intel compilers have problem with this type of operation

arr(:) = arr(v)

where arr is an allocatable array of derived type with a member that is an allocatable array, v is an array of integer.

I have used ifort Ubuntu 20.04.1 LTS with ifort 19.1.2.254 and 19.1.3.304.

You can reproduce the problem compiling the file test.f90.
The result with ifort 19.1.2.254 or 19.1.3.304
XTEST before = 1 2 3 4 5 6 7 8 9 10
XTEST after = 1 2 3 4 5 6 7 8 9 10

is wrong. The correct result is:

XTEST before = 1 2 3 4 5 6 7 8 9 10
XTEST after = 10 9 8 7 6 5 4 3 2 1

that could be obtained compiling with gfortran or with old version of ifort, e.g. 19.0.0.117, 19.0.4.243.

0 Kudos
3 Replies
Ron_Green
Moderator
284 Views

Yes, this is an interesting bug for sure.

I will write up a bug report.

Ron_Green
Moderator
276 Views

Bug ID is CMPLRIL0-33408


Barbara_P_Intel
Moderator
144 Views

This bug is fixed now. Please try the current Fortran compiler release, 2021.4.0, at let me know how it works for you. It's part of oneAPI HPC Toolkit 2021.4.



Reply