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 Beiträge / 0 neu
Letzter Beitrag
Nähere Informationen zur Compiler-Optimierung finden Sie in unserem Optimierungshinweis.
Bild des Benutzers Steve Lionel (Intel)

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

Steve

Steve

Melden Sie sich an, um einen Kommentar zu hinterlassen.