STINNER Victor <victor.stin...@haypocalc.com> added the comment: With gcc-4.6 -O1, Python 3.2 works correctly. With gcc-4.6 -O1 -ftree-vectorize, the assertion "assert (new_line - last_line < 255);" fails in PyCode_Optimize().
I think that the problem is in the following loop: ------------------------------------- #define NOP 9 #define HAVE_ARGUMENT 90 /* Opcodes from here have an argument: */ #define HAS_ARG(op) ((op) >= HAVE_ARGUMENT) #define CODESIZE(op) (HAS_ARG(op) ? 3 : 1) unsigned char *codestr = NULL; Py_ssize_t codelen; int *addrmap = NULL; /* Fixup linenotab */ for (i=0, nops=0 ; i<codelen ; i += CODESIZE(codestr[i])) { addrmap[i] = i - nops; if (codestr[i] == NOP) nops++; } ------------------------------------- gcc-4.6 -O1: ------------------------------------- 0x0000000000480991 <+5041>: mov %eax,%edx 0x0000000000480993 <+5043>: sub %esi,%edx 0x0000000000480995 <+5045>: mov %edx,(%r12,%rax,4) 0x0000000000480999 <+5049>: movzbl 0x0(%rbp,%rax,1),%edx 0x000000000048099e <+5054>: cmp $0x9,%dl 0x00000000004809a1 <+5057>: jne 0x4809a8 <PyCode_Optimize+5064> 0x00000000004809a3 <+5059>: add $0x1,%esi 0x00000000004809a6 <+5062>: jmp 0x4809b2 <PyCode_Optimize+5074> 0x00000000004809a8 <+5064>: mov $0x3,%ecx 0x00000000004809ad <+5069>: cmp $0x59,%dl 0x00000000004809b0 <+5072>: ja 0x4809b7 <PyCode_Optimize+5079> 0x00000000004809b2 <+5074>: mov $0x1,%ecx 0x00000000004809b7 <+5079>: add %rcx,%rax 0x00000000004809ba <+5082>: cmp %rax,%rdi 0x00000000004809bd <+5085>: jg 0x480991 <PyCode_Optimize+5041> ------------------------------------- gcc-4.6 -O1 -ftree-vectorize ------------------------------------- 0x0000000000480991 <+5041>: mov %eax,%ecx 0x0000000000480993 <+5043>: sub %edx,%ecx 0x0000000000480995 <+5045>: mov %ecx,(%r12,%rax,4) 0x0000000000480999 <+5049>: movzbl 0x0(%rbp,%rax,1),%ecx 0x000000000048099e <+5054>: lea 0x1(%rdx),%esi 0x00000000004809a1 <+5057>: cmp $0x9,%cl 0x00000000004809a4 <+5060>: cmovne %edx,%esi 0x00000000004809a7 <+5063>: cmove %esi,%edx 0x00000000004809aa <+5066>: setne %cl 0x00000000004809ad <+5069>: movzbl %cl,%ecx 0x00000000004809b0 <+5072>: lea 0x1(%rax,%rcx,2),%rax 0x00000000004809b5 <+5077>: cmp %rax,%rdi 0x00000000004809b8 <+5080>: jg 0x480991 <PyCode_Optimize+5041> ------------------------------------- ---------- nosy: +haypo _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue9880> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com