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

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
I tried to reproduce it with the following GNU C code but it still
worked:struct __st_parameter_dt
{
  const char *filename ;
  int linenum;
  int flags;
  int unit;
};
[[gnu::noinline, gnu::access(read_only, 1), gnu::access(read_only, 2, 3),
gnu::noclone, gnu::leaf]]
void print(struct __st_parameter_dt *b, void *a, int);
[[gnu::noinline, gnu::access(read_only, 1), gnu::noclone, gnu::leaf]]
void print1(struct __st_parameter_dt *b);
[[gnu::noinline, gnu::access(read_only, 1), gnu::noclone, gnu::leaf]]
void print2(struct __st_parameter_dt *b);

int main(void)
{
  double a;
  a = 1;
  [[gnu::noinline]]
  void f()
  {
      struct __st_parameter_dt b;
      b.filename = "a.c";
      b.linenum = 20;
      b.flags =128;
      b.unit = 1;
      print1(&b);
      print(&b, &a, sizeof(a));
      print2(&b);
  }
  f();
}

Reply via email to