[Bug tree-optimization/92152] [10 Regression] Wrong code (Resurrection of PR53663)

jakub at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Nov 20 18:18:00 GMT 2019


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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Indeed, following testcase aborts on x86_64-linux with -O2/-O3/-Os and succeeds
with -O0/-O1/-Og:

union U
{
  long long i;
  long f;
} v;

long
foo (long *f)
{
  *f = 1;
  v.i = 0;
  v.f = 0;
  return *f;
}

int
main ()
{
  if (foo (&v.f) != 0)
    __builtin_abort ();
  return 0;
}

Started with r271813.


More information about the Gcc-bugs mailing list