[issue1084] ''.find() gives wrong result in Python built with ICC

Simon Anders report at bugs.python.org
Sun Sep 2 11:31:40 CEST 2007


Simon Anders added the comment:

Martin, you are right: is is related to compiler optimization. I have
boiled it down to a call of stringlib_find (defined in
Python-2.5.1/Objects/stringlib/find.h) and this runs fine with 'icc -O2'
but incorrectly for 'icc -O3'. (The test code is attached.)

So, it seems that the lesson is simply once again: Do not use '-O3' with
Intel's C compiler. (At least, for me, it is not the first time that
this caused trouble.)

On the other hand, Python's ./configure script is quite clear in its
preference of GCC, anyway: It more or less ignores with option
'--without-gcc' and uses the content of the CC environment variable only
very occasionally.

__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue1084>
__________________________________
-------------- next part --------------
A non-text attachment was scrubbed...
Name: findtest.c
Type: text/x-csrc
Size: 727 bytes
Desc: not available
Url : http://mail.python.org/pipermail/python-bugs-list/attachments/20070902/ee7b7139/attachment.c 


More information about the Python-bugs-list mailing list