-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Closed
Labels
bugIndicates an unexpected problem or unintended behaviorIndicates an unexpected problem or unintended behaviorcompiler:codegenGeneration of LLVM IR and native codeGeneration of LLVM IR and native coderegressionRegression in behavior compared to a previous versionRegression in behavior compared to a previous version
Milestone
Description
MWE for a codegen bug observed "in the wild"
julia> f(a, b) = a[1] = b[1]
f (generic function with 1 method)
julia> @code_llvm optimize=false raw=true f(Tuple{Int}[], Tuple{Union{}}[])
julia: /data/vtjnash/julia/src/intrinsics.cpp:287: llvm::Value* emit_unboxed_coercion(jl_codectx_t&, llvm::Type*, llvm::Value*): Assertion `to->isIntOrPtrTy() || to->isFloatingPointTy()' failed.
signal (6): Aborted
in expression starting at REPL[3]:1
gsignal at /lib/x86_64-linux-gnu/libc.so.6 (unknown line)
abort at /lib/x86_64-linux-gnu/libc.so.6 (unknown line)
unknown function (ip: 0x7fc43c965728)
__assert_fail at /lib/x86_64-linux-gnu/libc.so.6 (unknown line)
emit_unboxed_coercion at /data/vtjnash/julia/src/intrinsics.cpp:287
emit_unbox at /data/vtjnash/julia/src/intrinsics.cpp:353
typed_store at /data/vtjnash/julia/src/cgutils.cpp:1485
emit_builtin_call at /data/vtjnash/julia/src/codegen.cpp:2984
emit_call at /data/vtjnash/julia/src/codegen.cpp:3692
emit_expr at /data/vtjnash/julia/src/codegen.cpp:4509
emit_ssaval_assign at /data/vtjnash/julia/src/codegen.cpp:4160
emit_stmtpos at /data/vtjnash/julia/src/codegen.cpp:4402 [inlined]
emit_function at /data/vtjnash/julia/src/codegen.cpp:7191
jl_emit_code at /data/vtjnash/julia/src/codegen.cpp:7564
split from #40065 (comment)
(prior to f313b08, we didn't have an assert here and would just return Undef)
Metadata
Metadata
Assignees
Labels
bugIndicates an unexpected problem or unintended behaviorIndicates an unexpected problem or unintended behaviorcompiler:codegenGeneration of LLVM IR and native codeGeneration of LLVM IR and native coderegressionRegression in behavior compared to a previous versionRegression in behavior compared to a previous version