view gcc/testsuite/gcc.c-torture/compile/pr22422.c @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children
line wrap: on
line source

/* We should not crash trying to figure out the points-to sets for the below.  We used to because we
   ended up adding pointers to the points-to set of the ANYTHING variable.  */
struct D
{
  int n;
  int c [8];
};

struct A
{
  int i;
  char *p;
};

struct B
{
  struct A *a;
  struct D *d;
};

int dtInsert1 (struct B *b)
{
  struct A a = { 0, 0 };
  struct D *d;
  b->a = &a;
  d = b->d;
  &d->c [d->n];
  return 0;
}