This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug optimization/13758] New: [tree-ssa] consecutive stores to the same array element not removed
- From: "dann at godzilla dot ics dot uci dot edu" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 20 Jan 2004 06:33:48 -0000
- Subject: [Bug optimization/13758] New: [tree-ssa] consecutive stores to the same array element not removed
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
int foo (int * arr)
{
arr[0] = 1;
arr[0] = 2;
}
the .optimized dump when compiling with -O2 is:
foo (arr)
{
<bb 0>:
*arr = 1; /* This should be eliminated*/
*arr = 2;
return;
}
--
Summary: [tree-ssa] consecutive stores to the same array element
not removed
Product: gcc
Version: tree-ssa
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: dann at godzilla dot ics dot uci dot edu
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13758