This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/14841] [tree-ssa] const_array[CST] is not folded
- From: "kazu at cs dot umass dot edu" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 13 Aug 2004 08:13:04 -0000
- Subject: [Bug tree-optimization/14841] [tree-ssa] const_array[CST] is not folded
- References: <20040403234930.14841.kazu@cs.umass.edu>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From kazu at cs dot umass dot edu 2004-08-13 08:13 -------
There is a piece of code in expr.c around line 6700 that folds references to
constant arrays with constant indecies.
The only problem is that we have to be careful not to fold
things like &array[2].
I am not sure if there is a way to see the containing expression
in fold().
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14841