GCC Bugzilla – Bug 41453
use INTENT(out) for optimization
Last modified: 2013-03-29 09:04:29 UTC
In the following subroutine
INTEGER :: a
INTEGER, INTENT(OUT) :: a
END SUBROUTINE S1
The store 'a=7' is dead, and can be removed by the compiler, because it is an INTENT(out) argument of S2.
I believe that implementing this optimization could break quite some code out there (including CP2K) that is not standard conforming in this respect. This should presumably not be implemented unless there is some solution for PR31447.
still happens on 4.8 trunk