Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
91 Views

Problem in ifort 19.1.2.254 with arr = arr(v)

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
2 Replies
Highlighted
Moderator
76 Views

Yes, this is an interesting bug for sure.

I will write up a bug report.

0 Kudos
Highlighted
Moderator
68 Views

Bug ID is CMPLRIL0-33408


0 Kudos