Error with gcc-4.6 -O1 -ftree-vectorize

Victor Stinner victor.stinner@haypocalc.com
Wed Jan 12 13:37:00 GMT 2011


Hi,

Python 3.2 doesn't compile correctly with -O3:
http://bugs.python.org/issue9880

It looks like there are errors related to the -ftree-vectorize flag.
Attached file (peephole.c, code extracted from Python/peephole.c) shows
an error: I suppose that it is a compiler bug.

The program works fine with -O1, extract of the correct output:
----
addrmap[0]=0
addrmap[3]=3
addrmap[4]=4
addrmap[7]=7
addrmap[10]=10
addrmap[13]=13
addrmap[16]=16
addrmap[19]=19
addrmap[22]=22
...
----

With -O1 -ftree-vectorize, there are errors for addrmap[13] and
addrmap[19]:
----
addrmap[0]=0
addrmap[3]=3
addrmap[4]=0
addrmap[7]=0
addrmap[10]=0
addrmap[13]=32767
addrmap[16]=0
addrmap[19]=32767
addrmap[22]=0
...
----

Well, the output is completly different (eg. addrmap[4]=4 vs
addrmap[4]=0).

My setup:
 * Intel(R) Pentium(R) 4 CPU 3.00GHz
 * Debian Sid
 * gcc (Debian 20110106-1) 4.6.0 20110106 (experimental) [trunk revision
168538] 
 * Python 3.2 (r87949)

See also the previous thread about Python+gcc 4.6:
"gcc version 4.6.0 20100908 (experimental) (GCC) Fails to Build Python
2.7"
http://gcc.gnu.org/ml/gcc-help/2010-09/msg00170.html

Victor Stinner

-------------- next part --------------
A non-text attachment was scrubbed...
Name: peephole.c
Type: text/x-csrc
Size: 1531 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc-help/attachments/20110112/eb601eab/attachment.bin>


More information about the Gcc-help mailing list