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

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P1
   Target Milestone|---                         |12.3
           Keywords|needs-reduction             |
            Summary|csmith: -fipa-cp seems to   |[12/13 Regression] csmith:
                   |cause trouble since         |-fipa-cp seems to cause
                   |r12-2523-g13586172d0b70c    |trouble since
                   |                            |r12-2523-g13586172d0b70c

--- Comment #6 from Martin Liška <marxin at gcc dot gnu.org> ---
Reduced test-case:

$ cat pr109318.c
#pragma pack(1)
struct S {
  signed : 31;
  unsigned f4 : 20;
};

int tmp, g;
static struct S global;

static struct S func_16(struct S *ptr) {
  for (; g > 0; g+= 8)
    tmp &= 8;
  return *ptr;
}

int
main()
{
  struct S *local = &global;
  *local = func_16(local);

  return 0;
}

$ gcc pr109318.c -O2 && ./a.out
Segmentation fault (core dumped)

Reply via email to