This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/21568] New: [3.4 regression] Casts in folding *& omitted
- From: "rguenth at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 14 May 2005 14:09:44 -0000
- Subject: [Bug tree-optimization/21568] New: [3.4 regression] Casts in folding *& omitted
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
For the testcase
int x;
int foo(void)
{
x = 0;
return *(volatile int *)&x;
}
the tree-optimizers omit the volatile cast and cprop 0 to the
return statement which is invalid. This is a regression from
3.4 where we produced (with -O)
foo:
pushl %ebp
movl %esp, %ebp
movl $0, x
movl x, %eax
popl %ebp
ret
and now
foo:
pushl %ebp
movl %esp, %ebp
movl $0, x
movl $0, %eax
popl %ebp
ret
--
Summary: [3.4 regression] Casts in folding *& omitted
Product: gcc
Version: 4.0.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: tree-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: rguenth at gcc dot gnu dot org
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21568