(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.c-torture/
execute/
pr88904.c
       1  /* PR rtl-optimization/88904 */
       2  
       3  volatile int v;
       4  
       5  __attribute__((noipa)) void
       6  bar (const char *x, const char *y, int z)
       7  {
       8    if (!v)
       9      __builtin_abort ();
      10    asm volatile ("" : "+g" (x));
      11    asm volatile ("" : "+g" (y));
      12    asm volatile ("" : "+g" (z));
      13  }
      14  
      15  #define my_assert(e) ((e) ? (void) 0 : bar (#e, __FILE__, __LINE__))
      16  
      17  typedef struct {
      18    unsigned M1;
      19    unsigned M2 : 1;
      20    int : 0;
      21    unsigned M3 : 1;
      22  } S;
      23  
      24  S
      25  foo ()
      26  {
      27    S result = {0, 0, 1};
      28    return result;
      29  }
      30  
      31  int
      32  main ()
      33  {
      34    S ret = foo ();
      35    my_assert (ret.M2 == 0);
      36    my_assert (ret.M3 == 1);
      37    return 0;
      38  }