This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/17064] New: -falias-noargument-global doesn't eliminate dead stores
- From: "pbrook at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 17 Aug 2004 14:05:51 -0000
- Subject: [Bug tree-optimization/17064] New: -falias-noargument-global doesn't eliminate dead stores
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
When the following example is compiled with -fargument-noalias-global, the
store *p=1 is dead and should be removed.
-fargument-noalias-global is the default for Fortran.
#include <stdlib.h>
int i;
int j;
void bar(void)
{
i = 42;
}
void foo(int * p)
{
*p = 1;/* This store is dead with -fargument-noalias-global. */
bar ();
*p = 2;
}
int main()
{
i = 0;
j = 0;
foo(&j);
if (i != 42 || j != 2)
abort();
return 0;
}
--
Summary: -falias-noargument-global doesn't eliminate dead stores
Product: gcc
Version: 3.5.0
Status: UNCONFIRMED
Keywords: missed-optimization
Severity: enhancement
Priority: P2
Component: tree-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: pbrook at gcc dot gnu dot org
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: i686-pc-linux-gnu
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17064