1  /* { dg-do run } */
       2  /* { dg-options "-Os -fomit-frame-pointer -fno-asynchronous-unwind-tables" } */
       3  /* { dg-additional-options "-march=i686" { target ia32 } } */
       4  
       5  struct A { char a[16]; } a;
       6  
       7  void __attribute__((noinline, noclone))
       8  foo (struct A b)
       9  {
      10    if (__builtin_memcmp (b.a, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", 16))
      11      __builtin_abort ();
      12    asm volatile ("" : : : "memory");
      13  }
      14  
      15  void __attribute__((noinline, noclone))
      16  bar (struct A b)
      17  {
      18    foo (a);
      19    a = b;
      20  }
      21  
      22  int
      23  main ()
      24  {
      25    struct A b = { "\0\1\2\3\4\5\6\7\10\11\12\13\14\15\16\17" };
      26    bar (b);
      27    if (__builtin_memcmp (a.a, b.a, 16))
      28      __builtin_abort ();
      29    return 0;
      30  }
      31