[Bug tree-optimization/32100] New: [4.2/4.3 Regression] vrp bitfield miscompilation

belyshev at depni dot sinp dot msu dot ru gcc-bugzilla@gcc.gnu.org
Sat May 26 21:30:00 GMT 2007


// Kudos to Yuriy Tsibizov for doing all dirty work hunting down miscompilation
// of snd_emu10k1 driver in FreeBSD -CURRENT

// small testcase, compile with -O1 -ftree-vrp

void abort (void);

struct T
{
  int b : 1;
} t;

void __attribute__((noinline)) foo (int f)
{
  t.b = (f & 0x10) ? 1 : 0;
}

int main (void)
{
  foo (0x10);
  if (!t.b)
    abort ();
  return 0;
}


-- 
           Summary: [4.2/4.3 Regression] vrp bitfield miscompilation
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Keywords: wrong-code
          Severity: normal
          Priority: P3
         Component: tree-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: belyshev at depni dot sinp dot msu dot ru


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



More information about the Gcc-bugs mailing list