<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman,new york,times,serif;font-size:12pt"><div>When running Kaleidoscope[1-7]  from svn head (105926) in Debug mode I receive the following assertion. <br><br>Assertion failed: (C1->getType()->isIntOrIntVectorTy() && "Tried to create an integer operation on a non-integer type!"), function get, file Constants.cpp, line 1460.<br><br>Program received signal SIGABRT, Aborted.<br>0x93e33e42 in __kill ()<br>(gdb) where<br>#0  0x93e33e42 in __kill ()<br>#1  0x93e33e34 in kill$UNIX2003 ()<br>#2  0x93ea623a in raise ()<br>#3  0x93eb2679 in abort ()<br>#4  0x93ea73db in __assert_rtn ()<br>#5  0x005422da in llvm::ConstantExpr::get (Opcode=8, C1=0x150d7e0, C2=0x150d810, Flags=0) at Constants.cpp:1459<br>#6  0x00542ade in llvm::ConstantExpr::getAdd (C1=0x150d7e0, C2=0x150d810) at
 Constants.cpp:1859<br>#7  0x00004ca8 in llvm::ConstantFolder::CreateAdd (this=0x72082c, LHS=0x150d7e0, RHS=0x150d810) at Support/ConstantFolder.h:37<br>#8  0x000091dd in llvm::IRBuilder<true, llvm::ConstantFolder, llvm::IRBuilderDefaultInserter<true> >::CreateAdd (this=0x720818, LHS=0x150d7e0, RHS=0x150d810, Name=@0xbffff54c) at Support/IRBuilder.h:324<br>#9  0x0000470b in BinaryExprAST::Codegen (this=0x150d2d0) at toy.cpp:670<br>#10 0x00004596 in BinaryExprAST::Codegen (this=0x150d320) at toy.cpp:665<br>#11 0x000036c7 in FunctionAST::Codegen (this=0x150d330) at toy.cpp:977<br>#12 0x00003796 in HandleDefinition () at toy.cpp:1006<br>#13 0x000038eb in MainLoop () at toy.cpp:1053<br>#14 0x00003bb8 in main () at toy.cpp:1131<br><br>I believe the issue is that an integer add/sub/mult/div IR instruction is being emitted when an fadd/fsub/fmul should be.  I have attached a patch which fixes the assertion. <br></div>
</div><br>

      </body></html>