Save vs automatic surprise

Save vs automatic surprise

Hi there,
I found a surprising behaviour of the IFC compiler while tracking a bug. A minimal size example:

subroutine try(n)
integer :: n

real, save :: vect(n)

vect(1) = 1.0
return
end subroutine try

This code is illegal, because array vect cannot possibily be save'd. However IFC 7.0 compiles the code by silently making array vect automatic, whereas every other compiler I tried flags this as an error. I don't know whether the language standard prescribes anything in this case, but IFC's behaviour is nonetheless surprising.
Any comments?
Thanks

Salvatore Filippone
University of Rome Tor Vergata, Rome, Italy

2 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.

I agree, this is a bug. Please report it through Intel Premier Support.

Steve

Steve - Intel Developer Support

Laisser un commentaire

Veuillez ouvrir une session pour ajouter un commentaire. Pas encore membre ? Rejoignez-nous dès aujourd’hui