(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.dg/
torture/
pr65270-2.c
       1  /* { dg-do run } */
       2  /* { dg-options "-fno-common" { target hppa*-*-hpux* } } */
       3  
       4  struct a 
       5  {
       6    int a[100];
       7  };
       8  typedef struct a misaligned_t __attribute__ ((aligned (8)));
       9  typedef struct a aligned_t __attribute__ ((aligned (32)));
      10  
      11  __attribute__ ((used))
      12  __attribute__ ((noinline))
      13  void
      14  t(void *a, int misaligned, aligned_t *d)
      15  {
      16    int i,v;
      17    for (i=0;i<100;i++)
      18      d->a[i]+=!misaligned? ((aligned_t *)a)->a[i] : ((misaligned_t *)a)->a[i];
      19  }
      20  struct b {int v; misaligned_t m;aligned_t aa;} b;
      21  aligned_t d;
      22  int
      23  main()
      24  {
      25    t(&b.m, 1, &d);
      26    return 0;
      27  }