view gcc/testsuite/gcc.c-torture/compile/pr42237.c @ 158:494b0b89df80 default tip

...
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Mon, 25 May 2020 18:13:55 +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);
}