This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/18848] New: PRE creates "a_1 = 0 * 4" but does not fold it.
- 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: 5 Dec 2004 18:02:43 -0000
- Subject: [Bug tree-optimization/18848] New: PRE creates "a_1 = 0 * 4" but does not fold it.
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Compile this with -O2.
void
foo (int *table, unsigned int size)
{
unsigned int i;
for (i = 0; i < size; i++)
{
if (table[i])
break;
}
table[i] = 0;
}
I get:
pretmp.2_22 = 0 * 4;
--
Summary: PRE creates "a_1 = 0 * 4" but does not fold it.
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: tree-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
GCC target triplet: i686-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18848