https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65270

--- Comment #28 from Jan Hubicka <hubicka at gcc dot gnu.org> ---
.. and yet another variant, this time folded early. 

struct a 
{
  int a[100000];
};
typedef struct a misaligned_t __attribute__ ((aligned (8)));
typedef struct a aligned_t __attribute__ ((aligned (32)));

__attribute__ ((used))
__attribute__ ((noinline))
t(void *a, int misaligned, aligned_t *d)
{
  int i,v;
  for (i=0;i<100000;i++)
    d->a[i]+=!misaligned? ((aligned_t *)a)->a[i] : ((misaligned_t *)a)->a[i];
}
struct b {int v; misaligned_t m;aligned_t aa;} b;
aligned_t d;
main()
{
  t(&b.m, 1, &d);
}

Reply via email to