view gcc/testsuite/gcc.dg/torture/pr54109.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

/* { dg-do compile } */

typedef struct
{
  unsigned long bits[4];
} nodemask_t;

struct cpuset
{
  long flags;
  nodemask_t mems_allowed;
  struct cpuset *parent;
} b;

void func1(unsigned long *p1, int p2)
{
  p1[p2 - 1] = 0;
}

void func2(nodemask_t *p1, int p2)
{
  func1(p1->bits, p2);
}

void func3(void)
{
  /* This accesses b.flags.  */
  func2(&b.mems_allowed, 0);
}