This is the mail archive of the gcc-bugs@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]

[Bug tree-optimization/18848] New: PRE creates "a_1 = 0 * 4" but does not fold it.


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]