Simon Anders added the comment:
Update to the story: After I submitted the bug report to Intel, they
investigated and quickly confirmed it to be a compiler bug, whcih they
then managed to fix.
I have just got an e-mail from Intel that the newest available version
of ICC, namely version
Martin v. Löwis added the comment:
It definitely sounds like a compiler bug. Unless you can provide further
details to the specific error in the C code of Python, it's likely that
we can do little about it.
If you want to analyze this further, here is a number of things you can try:
- compile
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,
Martin v. Löwis added the comment:
If you are curious, we could now try to find out what precisely goes
wrong. The procedure would be this
* after each step, check whether the problem still occurs
a) resolve the includes manually, then strip everything that isn't
needed. This could start with
Simon Anders added the comment:
Martin: I've boiled down the test case a bit more and removed all
Python-specific types and macros, so that it can now be compiled
stand-alone. (Updated test case 'findtest.c' attached.) I didn't feel
like diving into the code much deeper, and so I have sent it to
Changes by Simon Anders:
--
components: Build, Interpreter Core
severity: normal
status: open
title: ''.find() gives wrong result in Python built with ICC
versions: Python 2.5
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1084
New submission from Simon Anders:
I have just encountered a strange bug affecting Python 2.5.1 on an
x86_64 Linux, but only when compiled with the Intel C Compiler (ICC)
10.0, not a GCC-compiled Python. On my Intel-compiled one, which
otherwise seems to work fine, ''.find() works incorrectly.
I