arvindm95 / unladen-swallow

Automatically exported from code.google.com/p/unladen-swallow
Other
0 stars 0 forks source link

SystemError: invalid LLVM IR produced, with nested functions #78

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
If I run the small attached program (which contains nested functions) using
CPython 2.6.2, or old versions of unladen, or unladen trunk r820 with no -j
option, it works fine.

If I run it using unladen r820 and -j always, it fails with the following
traceback:

dripton@al ~/src/projecteuler $ ../unladen/python -j always primes.py
Incorrect number of arguments passed to called function!
  %9 = call i64 @llvm.exp2.i64(i8* %8, i8* %7, i64 %6, i32 0) nounwind
readonly ; <i64> [#uses=0]Intrinsic result type is not a floating-point type.
i64 (i64)* @llvm.exp2.i64
Broken module found, verification continues.
'import site' failed; use -v for traceback
Incorrect number of arguments passed to called function!
  %9 = call i64 @llvm.exp2.i64(i8* %8, i8* %7, i64 %6, i32 0) nounwind
readonly ; <i64> [#uses=0]Intrinsic result type is not a floating-point type.
i64 (i64)* @llvm.exp2.i64
Broken module found, verification continues.
Incorrect number of arguments passed to called function!
  %9 = call i64 @llvm.exp2.i64(i8* %8, i8* %7, i64 %6, i32 0) nounwind
readonly ; <i64> [#uses=0]Intrinsic result type is not a floating-point type.
i64 (i64)* @llvm.exp2.i64
Broken module found, verification continues.
SystemError: invalid LLVM IR produced

I don't know the exact unladen version where this problem appeared, but
it's recent.

Original issue reported on code.google.com by dript...@gmail.com on 2 Sep 2009 at 6:09

Attachments:

GoogleCodeExporter commented 8 years ago
Interesting. I've tried reproducing this on my x86_64 system and haven't been 
able to 
provoke this error yet. Which system are you running on? Which options did you 
give to 
./configure?

Original comment by collinw on 4 Sep 2009 at 1:19

GoogleCodeExporter commented 8 years ago
Gentoo Linux, 32-bit x86, no options to configure.

Since you couldn't reproduce it, I did "make distclean; ./configure; make" to 
confirm
that it wasn't a build problem.  And the bug went away.  So I suspect that it 
was a
build problem, probably some stale code from an older version of LLVM that 
didn't get
properly rebuilt after Unladen recently upgraded to a newer version of LLVM.

Sorry for the noise.

Original comment by dript...@gmail.com on 4 Sep 2009 at 4:14

GoogleCodeExporter commented 8 years ago
No worries, thanks for taking the trouble to file the bug.

Original comment by collinw on 4 Sep 2009 at 5:24