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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |ASSIGNED

--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-04-14 
12:02:38 UTC ---
extern int bar (float *, float *, int, int, int);
int
foo (float x, float *y)
{
  float z, t[3];
  int e, m, n, i, h;
  int q, r;
  asm ("movd %1, %0" : "=rm" (q) : "x" (x));
  h = q;
  i = h & 0x7fffffff;
  e = (i >> 23) - 134;
  r = i - ((int) (e << 23));
  asm ("movd %1, %0" : "=x" (z) : "rm" (r));
  m = 3;
  n = bar (t, y, e, m, 2);
  if (h < 0)
    {
      y[0] = -y[0];
      y[1] = -y[1];
      return -n;
    }
  return n;
}

at -O2 is a shorter testcase, fails with vanilla 4.4 and 4.5 (and RHEL 6.0
gcc),
works with 4.6/4.7 (and RHEL 6.1 gcc), with
http://gcc.gnu.org/ml/gcc-patches/2010-09/msg01557.html
optimization mitigating the bug.  The bug is that dwarf2out_frame_debug isn't
called for inline asm.

Reply via email to