(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.dg/
asan/
pr99673.c
       1  /* { dg-do compile } */
       2  /* Skip XPASS cases.  */
       3  /* { dg-skip-if "" { *-*-* } { "-O0" "-O1" "-O2 -flto" } { "" } } */
       4  /* { dg-additional-options "-Wstringop-overread" } */
       5  
       6  struct B {
       7    int i;
       8    struct A {
       9      short sa[8];
      10    } a[2];
      11  };
      12  
      13  struct C {
      14    char n, ax[];
      15  };
      16  
      17  struct D { int i, j, k; };
      18  
      19  int f (const short[8]);
      20  
      21  void g (struct C *pc, struct D *pd, int i)
      22  {
      23    struct B *pb = (void *)pc->ax;
      24    pd->i = pb->i;
      25  
      26    const short *psa = pb->a[i].sa;
      27    if (f (psa)) /* { dg-bogus "from a region of size" "pr99673" { xfail *-*-* } } */
      28      return;
      29  }