(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.dg/
ipa/
pr45644.c
       1  /* Verify that we do not IPA-SRA bitfields.  */
       2  /* { dg-do run } */
       3  /* { dg-options "-O2"  } */
       4  /* { dg-require-effective-target int32plus } */
       5  
       6  extern void abort (void);
       7  
       8  struct S
       9  {
      10    int j : 8;
      11    int i : 24;
      12    int l;
      13  };
      14  
      15  static int __attribute__((noinline)) foo (struct S *s)
      16  {
      17    int z = s->i;
      18    if (z != 777)
      19      abort ();
      20    return 0;
      21  }
      22  
      23  int __attribute__((noinline)) bar (struct S *s)
      24  {
      25    return foo (s);
      26  }
      27  
      28  int main (int argc, char *argv[])
      29  {
      30    struct S s;
      31    s.j = 5;
      32    s.i = 777;
      33    s.l = -1;
      34  
      35    return bar (&s);
      36  }