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

             Bug #: 52528
           Summary: combine bug (powerpc testcase)
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: rtl-optimization
        AssignedTo: unassig...@gcc.gnu.org
        ReportedBy: clt...@gcc.gnu.org
            Target: powerc-linux


The below testcase:
struct S {
  unsigned a : 30;
  unsigned b :  2;
};

int foo (int b)
{
  struct S s = {0};
  s.b = b;
  return bar (0x000b0010, 0x00040100ULL, *(unsigned long *)&s);
}

currently on trunk (target powerpc) compiles to:
foo:
        lis 6,0x4
        li 5,0
        ori 6,6,256
        li 7,0
        crxor 6,6,6
        b bar

Notice the incorrect code generated: no construction of the 1st arg (reg 3),
and
wrong code for the 3rd arg (reg 7)

I have diagnosed this as a problem in combine, and have a patch in testing.
Opening this issue for status tracking.

Reply via email to