void foo(int*p, int*q)
{
    *p = 10;   // <<--- dead, but not removed
    *q = 20;
    *p = 30;
}

int g;
void bar(int* p)
{
   *p = 10;  // Dead -- not removed.
   g = 1;
   *p = 10;
}


-- 
           Summary: Missing dead store elimination
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: xinliangli at gmail dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35290

Reply via email to