[Bug tree-optimization/55022] [4.8/4.9 Regression] air.f90 is miscompliled with -m64 -O2 -fgraphite-identity after revision 190619

kargov at gmail dot com gcc-bugzilla@gcc.gnu.org
Fri Apr 11 11:32:00 GMT 2014


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55022

--- Comment #21 from Vladimir Kargov <kargov at gmail dot com> ---
(In reply to rguenther@suse.de from comment #20)

> I can't seem to observe the above with the testcase or sth like
> the following suitable for the testsuite

Can you please check the following:

#include <stdio.h>

void __attribute__ ((noinline))
BZ2_hbCreateDecodeTables(int *limit, int minLen, int maxLen)
{
  int i;

  for (i = minLen; i <= maxLen; i++) {
    limit[i] = i;
  }
}

void main()
{
  int limit[2] = {0, 0};
  int pos;

  BZ2_hbCreateDecodeTables (limit, 0, 1);

  printf("%d\n", limit[1]);
}

When compiled with "-fgraphite-identity -O3" on trunk it will give "0" which is
incorrect.

The patched version should give the correct "1".



More information about the Gcc-bugs mailing list