public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/35472]  New: [4.3/4.4 Regression] tree DSE is broken
@ 2008-03-05 13:00 rguenth at gcc dot gnu dot org
  2008-03-05 13:20 ` [Bug tree-optimization/35472] " rguenth at gcc dot gnu dot org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-03-05 13:00 UTC (permalink / raw)
  To: gcc-bugs

extern void abort (void);
extern void *memset (void *s, int c, __SIZE_TYPE__ n);
struct S { int i[16]; };
struct S *p;
void __attribute__((noinline))
foo(struct S *a, struct S *b) { a->i[0] = -1; p = b; }
void test (void)
{
  struct S a, b;
  memset (&a.i[0], '\0', sizeof (a.i));
  memset (&b.i[0], '\0', sizeof (b.i));
  foo (&a, &b);
  *p = a;
  *p = b;
  if (b.i[0] != -1)
    abort ();
}
int main()
{
  test();
  return 0;
}

tree DSE removes the *p = a store wrongly.  Non-executable testcase:

struct S { int i[16]; };
struct S *p;
void foo(struct S *, struct S *);
void test (void)
{
  struct S a, b;
  foo (&a, &b);
  *p = a;
  *p = b;
}


-- 
           Summary: [4.3/4.4 Regression] tree DSE is broken
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Keywords: wrong-code
          Severity: normal
          Priority: P3
         Component: tree-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: rguenth at gcc dot gnu dot org


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


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2008-03-07  9:50 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-03-05 13:00 [Bug tree-optimization/35472] New: [4.3/4.4 Regression] tree DSE is broken rguenth at gcc dot gnu dot org
2008-03-05 13:20 ` [Bug tree-optimization/35472] " rguenth at gcc dot gnu dot org
2008-03-05 14:48 ` rguenth at gcc dot gnu dot org
2008-03-05 14:57 ` rguenth at gcc dot gnu dot org
2008-03-05 16:14 ` [Bug tree-optimization/35472] [4.3 " rguenth at gcc dot gnu dot org
2008-03-05 16:14 ` rguenth at gcc dot gnu dot org
2008-03-07  9:48 ` rguenth at gcc dot gnu dot org
2008-03-07  9:50 ` rguenth at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).