This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/29715] New: fold produces &a - 4
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 4 Nov 2006 21:30:36 -0000
- Subject: [Bug middle-end/29715] New: fold produces &a - 4
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Take this valid testcase:
int main ()
{
static int a[] = { 0, 1, 2 };
int *i = a+3;
if (i-- > a)
return 0;
return 0;
}
In the IR (in .orginal) we get:
if ( --i > &a - 4B)
which is incorrect and not really defined.
--
Summary: fold produces &a - 4
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: middle-end
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: pinskia at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29715