1  /* PR middle-end/71408 */
       2  /* { dg-do run } */
       3  /* { dg-options "-Os" } */
       4  
       5  #if __SIZEOF_INT__ >= 4
       6  unsigned a, b;
       7  
       8  struct S0
       9  {
      10    int f1:18;
      11    unsigned f3:4;
      12  };
      13  #else
      14  __UINT32_TYPE__ a, b;
      15  
      16  struct S0
      17  {
      18    __INT32_TYPE__ f1:18;
      19    unsigned f3:4;
      20  };
      21  #endif
      22  
      23  void fn1 ()
      24  {
      25    struct S0 c = { 7, 0 };
      26    if (c.f1)
      27      c.f3 = 3;
      28    a = -~c.f3;
      29    c.f3 = ~(c.f1 && c.f1);
      30    c.f1 = c.f3 * (c.f1 - (c.f1 - a % c.f1)) + ~c.f3 * -a;
      31    b = ~(c.f1 & a);
      32    if (b >= 4294967295)
      33      __builtin_abort ();
      34  }
      35  
      36  int
      37  main ()
      38  {
      39    fn1 ();
      40    return 0;
      41  }