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 t(void * a,int misaligned,aligned_t * d)14t(void *a, int misaligned, aligned_t *d) 15 { 16 int i,v; 17 for (i=0;i<100;i++) 18 { 19 if (misaligned) 20 v=((misaligned_t *)a)->a[i]; 21 else 22 v=((aligned_t *)a)->a[i]; 23 d->a[i]+=v; 24 } 25 } 26 struct b {int v; misaligned_t m;aligned_t aa;} b; 27 aligned_t d; 28 int main()29main() 30 { 31 t(&b.m, 1, &d); 32 return 0; 33 } 34