clay icon indicating copy to clipboard operation
clay copied to clipboard

`-g -e` don't work together

Open jckarter opened this issue 13 years ago • 2 comments

% ./build/compiler/clay -g -e ''  
pseudo instructions should be removed before code emission
UNREACHABLE executed at /Users/joe/Documents/Code/others/llvm-3.1.src/lib/Target/X86/X86CodeEmitter.cpp:736!
Stack dump:
0.  Running pass 'X86 Machine Code Emitter' on function '@"core.errors.backtrace.showBacktrace() clay"'
signal 4!
zsh: illegal hardware instruction  ./build/compiler/clay -g -e ''

jckarter avatar Oct 10 '12 15:10 jckarter

After building with llvm 3.2 get the following error:

> compiler/clay -g -e ''
clay: DIBuilder.cpp:1003: llvm::Instruction *llvm::DIBuilder::insertDeclare(llvm::Value *, llvm::DIVariable, llvm::BasicBlock *): Assertion `VarInfo.Verify() && "invalid DIVariable passed to dbg.declare"' failed.
signal 6!

compilation context: 
    PrintfFmt(Static[Int32])
  /home/jeremy/dev/clay/clay/build/compiler/../../lib-clay/core/numbers/overflow/overflow.clay(278,52):
    errorWithPrintfNoThrow(Static["invalid integer math: integerConvertWithOverflow(UInt64, %d)"], Int32)
  /home/jeremy/dev/clay/clay/build/compiler/../../lib-clay/core/numbers/overflow/overflow.clay(276,30):
    checked(Static[integerConvertWithOverflow], Static[UInt64], Int32)
  /home/jeremy/dev/clay/clay/build/compiler/../../lib-clay/core/numbers/overflow/overflow.clay(308,13):
    doIntegerConvertChecked(Static[UInt64], Int32)
  /home/jeremy/dev/clay/clay/build/compiler/../../lib-clay/core/numbers/numbers.clay(478,27):
    UInt64(Int32)
  /home/jeremy/dev/clay/clay/build/compiler/../../lib-clay/core/arrays/arrays.clay(15,47):
    size(Array[Pointer[UInt8], 128])
  /home/jeremy/dev/clay/clay/build/compiler/../../lib-clay/core/errors/backtrace/platform/platform.unix.clay(26,16):
    Int32(UInt64)
  /home/jeremy/dev/clay/clay/build/compiler/../../lib-clay/core/errors/backtrace/platform/platform.unix.clay(26,11):
    call(ExternalCodePointer[AttributeCCall, false, [Pointer[Pointer[UInt8]], Int32], [Int32]], Pointer[Pointer[UInt8]], Int32)
  /home/jeremy/dev/clay/clay/build/compiler/../../lib-clay/core/errors/backtrace/platform/platform.unix.clay(24,29):
    captureBacktrace()
  /home/jeremy/dev/clay/clay/build/compiler/../../lib-clay/core/errors/backtrace/backtrace.clay(9,29):
    showBacktrace()
  /home/jeremy/dev/clay/clay/build/compiler/../../lib-clay/core/exceptions/exceptions.clay(146,17):
    errorMsg(Static["exception when initializing globals\n"])
fish: Job 1, 'compiler/clay -g -e ''' terminated by signal SIGABRT (Abort)

ghost avatar Nov 13 '12 11:11 ghost

Cannot reproduce this bug on Archlinux using llvm3.2 & clay/master. Still occurs on OSX, maybe OSX specific?

ghost avatar Jan 07 '13 17:01 ghost