------- Comment #4 from astrange at ithinksw dot com  2009-06-05 04:31 -------
This bug must have been weaker than I remembered it; when I used 4 char fields
instead of one char[4], 4.4 behaved properly too.

How about:
Alexander Strange <astra...@ithinksw.com

        PR tree-optimization/36318
        * gcc.dg/tree-ssa/sra-7.c: New test.

/* { dg-do compile } */
/* { dg-options "-O1 -fdump-tree-sra-details" } */

typedef struct {char f[4];} __attribute__((aligned (4))) s;

void a(s *s1, s *s2)
{
    *s1 = *s2;
}

/* Struct copies should not be split into members */
/* { dg-final { scan-tree-dump "= \\\*s2"  "sra"} } */
/* { dg-final { cleanup-tree-dump "sra" } } */

I checked sra instead of esra since it runs last and this is a negative test.
Hopefully this is trivial?


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36318

Reply via email to