Bug 35134 - Invalid cse on aliased global variable
Summary: Invalid cse on aliased global variable
Status: RESOLVED DUPLICATE of bug 34363
Alias: None
Product: gcc
Classification: Unclassified
Component: tree-optimization (show other bugs)
Version: 4.2.3
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords: wrong-code
Depends on:
Blocks:
 
Reported: 2008-02-07 23:29 UTC by Jorn Wolfgang Rennecke
Modified: 2008-02-08 00:30 UTC (History)
3 users (show)

See Also:
Host:
Target: arc-elf32, i686-pc-linux-gnu
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jorn Wolfgang Rennecke 2008-02-07 23:29:15 UTC
The following testcase fails at -O3.  It succeeds at -O3 -fno-tree-fre -fno-tree-dominator-opts -fno-tree-pre


extern void abort (void);

int i;

int f (int *) __attribute((noinline));
int
f (int *p)
{
  int a, b;

  a = i;
  *p = 1;
  b = i;
  return a + b;
}

int
main (void)
{
  if (f (&i) != 1)
    abort ();
  return 0;
}
Comment 1 Andrew Pinski 2008-02-08 00:30:32 UTC

*** This bug has been marked as a duplicate of 34363 ***