[Bug target/95740] Failure to avoid using the stack when interpreting a float as an integer when it is modified afterwards

gabravier at gmail dot com gcc-bugzilla@gcc.gnu.org
Thu Oct 14 01:08:27 GMT 2021


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

--- Comment #3 from Gabriel Ravier <gabravier at gmail dot com> ---
I've also encountered what looks like a duplicate of this bug, although I'm not
sure but it seems likely:

int foo(float f)
{
  union
  {
    float f;
    int i;
  } z = { .f = f };

  return z.i - 1;
}

Which outputs roughly the same assembly code as the initial test case.


More information about the Gcc-bugs mailing list