enum { E0 = 0, E1 = 1, E2 = 2 } e;

int
foo (void)
{
  return __builtin_popcount ((int) e);
}

int
bar (int x)
{
  return __builtin_popcount (x);
}

In foo this is expanded into a call to __builtin_popcount, rather than
__popcountsi2 (or popcount instruction), at least on i?86/x86_64/ppc/ppc64.
In 4.1 this used to work correctly.


-- 
           Summary: [4.2/4.3/4.4 Regression] __builtin_popcount expansion
                    bug
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: jakub at gcc dot gnu dot org


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

Reply via email to