https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88240

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P2
      Known to work|                            |6.4.0
   Target Milestone|---                         |7.5
            Summary|Potential optimization bug: |[7/8/9/10 Regression]
                   |invalid pre-load of         |Potential optimization bug:
                   |floating-point value could  |invalid pre-load of
                   |cause SIGFPE-underflow if   |floating-point value could
                   |value is integer            |cause SIGFPE-underflow if
                   |                            |value is integer
      Known to fail|                            |7.1.0

--- Comment #13 from Richard Biener <rguenth at gcc dot gnu.org> ---
Runtime testcase that aborts with -O2 -m32 -mno-sse (using fldl/fstpl):

int flag;
union { double f; unsigned long long i; } u;
void __attribute__((noinline))
init ()
{
  flag = 1;
  u.i = 18442936822990639076ULL;
}
unsigned long long __attribute__((noinline))
test ()
{
  if (flag)
    return u.i;
  else
    return u.f;
}
int main()
{
  init ();
  if (test () != 18442936822990639076ULL)
    __builtin_abort ();
  return 0;
}

Reply via email to