This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
The second of the two fixes mentioned above follows the "why fix it once" idiom, by teaching fold-const.c/fold_stmt that dereferencing constant initialized arrays with a constant index returns a constant result. This should allow the constant index in the test case below to be seen by the tree-ssa optimizers. Unfortunately, this second change is significantly more intrusive, and probably not appropriate for the 4.0 and 4.1 release branches.
Store CCP already does this optimization which is why at -O2 the ICE does not show up. Now one could argue that Store CCP should also be turned on at -O1 (which I think is a good thing).
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |