This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/41453] New: use INTENT(out) for optimization
- From: "jv244 at cam dot ac dot uk" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 23 Sep 2009 19:00:19 -0000
- Subject: [Bug middle-end/41453] New: use INTENT(out) for optimization
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
In the following subroutine
SUBROUTINE S1()
INTEGER :: a
INTERFACE
SUBROUTINE S2(a)
INTEGER, INTENT(OUT) :: a
END SUBROUTINE
END INTERFACE
a=7
CALL S2(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.
--
Summary: use INTENT(out) for optimization
Product: gcc
Version: 4.5.0
Status: UNCONFIRMED
Keywords: missed-optimization
Severity: enhancement
Priority: P3
Component: middle-end
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: jv244 at cam dot ac dot uk
BugsThisDependsOn: 31447
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41453