This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/23911] Failure to propagate constants from a const initializer for _Complex
- From: "steven at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 16 Sep 2005 10:39:50 -0000
- Subject: [Bug tree-optimization/23911] Failure to propagate constants from a const initializer for _Complex
- References: <20050916080919.23911.steven@gcc.gnu.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From steven at gcc dot gnu dot org 2005-09-16 10:39 -------
The reason why this only happens in store-ccp is this:
/* If we are not doing store-ccp, statements with loads
and/or stores will never fold into a constant. */
if (!do_store_ccp
&& (ann->makes_aliased_stores
|| ann->makes_aliased_loads
|| !ZERO_SSA_OPERANDS (stmt, SSA_OP_ALL_VIRTUALS)))
return VARYING;
But statements making loads _will_ fold into a constant if the load is
made from a constant initializer.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23911