(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.dg/
torture/
pr30375.c
       1  /* { dg-do run } */
       2  
       3  typedef struct _s {
       4      int a;
       5      int b;
       6      int c;
       7      int d;
       8  } s;
       9  
      10  extern void abort(void);
      11  
      12  void __attribute__((noinline)) g(s *p)
      13  {
      14    if (p->d != 0)
      15      abort ();
      16  }
      17  
      18  char *c = (void*)0;
      19  void __attribute__((noinline)) f(void) { if (c) *c = 1; }
      20  
      21  void test_signed_msg_encoding(void)
      22  {
      23      s signInfo = { sizeof(signInfo), 0 };
      24  
      25      signInfo.b = 1;
      26      signInfo.c = 0;
      27      g(&signInfo);
      28      signInfo.d = 1;
      29      f();
      30  }
      31  
      32  int main()
      33  {
      34    test_signed_msg_encoding ();
      35    test_signed_msg_encoding ();
      36    return 0;
      37  }