This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug middle-end/29715] New: fold produces &a - 4


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]