(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.c-torture/
execute/
pr108064.c
       1  /* PR tree-optimization/108064 */
       2  
       3  static inline short
       4  foo (short value)
       5  {
       6    return ((value >> 8) & 0xff) | ((value & 0xff) << 8);
       7  }
       8  
       9  __attribute__((noipa))
      10  void
      11  bar (short *d, const short *s)
      12  {
      13    for (unsigned long i = 0; i < 4; i++)
      14      d[i] = foo (s[i]);
      15  }
      16  
      17  int
      18  main ()
      19  {
      20    short a[4] __attribute__((aligned (16))) = { 0xff, 0, 0, 0 };
      21    short b[4] __attribute__((aligned (16)));
      22    short c[4] __attribute__((aligned (16)));
      23  
      24    bar (b, a);
      25    bar (c, b);
      26    if (a[0] != c[0])
      27      __builtin_abort ();
      28  }