[ICE] intrinsic call with allocatable array and scalar with -assume realloc_lhs

[ICE] intrinsic call with allocatable array and scalar with -assume realloc_lhs

Hi,
following code:

program ala
real, dimension(:), allocatable :: a
allocate(a(2))
a = 0.0
a = min(a, 1.0)
print *, a
deallocate(a)
end program ala

causes ICE when compiled with: ifort -assume realloc_lhs ala.f90
Compiler that I've used:
Intel(R) Fortran Intel(R) 64 Compiler XE for applications running on Intel(R) 64, Version 13.0.0.079 Build 20120731
Best regards,
Kacper Kowalik

10 posts / 0 nouveau(x)
Dernière contribution
Reportez-vous à notre Notice d'optimisation pour plus d'informations sur les choix et l'optimisation des performances dans les produits logiciels Intel.

Hello Kacper

I will investigate and will escalate to engineering, I will let you know about more details later.

Heinz

Hello Kacper

I have escalated the problem to the compiler developers; case number is DPD200236655. I will let you know when a compiler with a fix will be available,

Thanks for providing such a small test case

Heinz

Might be a good workaround for you: Swapping the arguments for MIN() prevents the bug; a = min(1.0, a) works as expected.

Quote:

HeinzB (Intel) wrote:

Might be a good workaround for you: Swapping the arguments for MIN() prevents the bug; a = min(1.0, a) works as expected.

That bug is still present in 13.0.1 and that workaround cannot be applied to all intrinsic funtion, like "ishft" where order of arguments matter. Better way to   avoid this is to explictly disable realloc_lhs in offending lines by adding (:), e.g. a(:) = min(a, 1.0)

Cheers,

Kacper

Just noticed that new version of the compiler was released yesterday with the fix, sorry for the noise :-)

Not fixed quite yet. Although it now works for original code with "min" it still ICEs for other functions (with ifort-13.1):

program ala 
 integer, dimension(:), allocatable :: a 
 allocate(a(2)) 
 a = 0
 a = ishft(a, -1) 
 deallocate(a) 
end program ala

Sigh - I can reproduce this and will report it.  Thanks. Issue ID is DPD200240757.

Steve

Kacper, the problem with ishft is expected to be fixed in Update 3. We have gone through all of the intrinsics where this could be a problem and implemented a common solution.

Steve

The ICE has been fixed by 13.0 Update 1 already; sorry for the late update. I just tested Update 2 and it doesn't show the ICE either.

 

Heinz

 

Connectez-vous pour laisser un commentaire.