This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug optimization/13761] New: [tree-ssa] component refs to the same struct should not alias
- From: "dann at godzilla dot ics dot uci dot edu" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 20 Jan 2004 07:03:18 -0000
- Subject: [Bug optimization/13761] New: [tree-ssa] component refs to the same struct should not alias
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
struct s { int s; int s2; char p; int arr[10];};
int foo0 (struct s * f)
{
f->s = 1;
f->s2 = 2;
if (f->s != 1)
link_error ();
}
The "if" is not optimized because, presumably, the 2 stores are not considered
not to alias.
The .optimized dump:
foo0 (f)
{
<bb 0>:
f->s = 1;
f->s2 = 2;
if (f->s != 1) goto <L0>; else goto <L1>;
<L0>:;
link_error ();
<L1>:;
return;
}
--
Summary: [tree-ssa] component refs to the same struct should not
alias
Product: gcc
Version: tree-ssa
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: dann at godzilla dot ics dot uci dot edu
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13761