This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug optimization/14841] New: [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: 3 Apr 2004 23:49:30 -0000
- Subject: [Bug optimization/14841] New: [tree-ssa] const_array[CST] is not folded
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
static const int banana[] = { 0, 1, 2, 3 };
int
foo (void)
{
return banana[2];
}
const int grape[] = { 0, 1, 2, 3 };
int
bar (void)
{
return grape[2];
}
I get:
;; Function foo (foo)
foo ()
{
<bb 0>:
return banana[2];
}
;; Function bar (bar)
bar ()
{
<bb 0>:
return grape[2];
}
--
Summary: [tree-ssa] const_array[CST] is not folded
Product: gcc
Version: tree-ssa
Status: UNCONFIRMED
Keywords: pessimizes-code
Severity: enhancement
Priority: P2
Component: optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: kazu at cs dot umass dot edu
CC: gcc-bugs at gcc dot gnu dot org
OtherBugsDependingO 14840
nThis:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14841