view gcc/testsuite/gcc.c-torture/compile/pr42237.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

struct A
{
  int p;
};

struct B
{
  struct A n;
  struct A m;
  int x;
  int y;
  int z;
};

extern int g1, g2;

static void __attribute__((noinline)) foo (struct B *b)
{
  int t;

  t = b->n.p;
  g1 = t;
  b->n.p = t+1;
  g2 = b->m.p;

  b->m = b->n;
}

void bar (struct B *b)
{
  foo (b);
}