-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bounds error on empty splat #37555
Comments
This is not a problem with syntax. It's ok to list keyword arguments without a Oddly enough, if I forget to do julia> function eigvals_mod(A::AbstractMatrix; kwargs...)
@assert size(A)[1] == size(A)[2] "Matrix A needs to be square"
eigvals!(copy(A), kwargs...)
end
eigvals_mod (generic function with 1 method)
julia> eigvals_mod(randn(2,2))
ERROR: UndefVarError: eigvals! not defined
Stacktrace:
[1] #eigvals_mod#7
@ ./REPL[1]:3 [inlined]
[2] eigvals_mod(A::Matrix{Float64})
@ Main ./REPL[1]:2
[3] top-level scope
@ REPL[2]:1
julia> using LinearAlgebra
julia> eigvals_mod(randn(2,2))
2-element Vector{Float64}:
-0.1764691396097775
2.5547516089663445 So I think this is a compiler bug involving inference and iteration. @Keno could this be due to the changes in #36684? |
Yes it looks like a compiler bug. Works fine with --compile=min. |
While working on IR, we give pending nodes SSA ids after the main body of the function, and then we drop them in place during compaction. Inlining was using thse IDs to try to determine which basic block we're currently inlining into, but for pending blocks it was looking at the raw ID rather than the insertion position, corrupting the CFG. Fixes #37555 Fixes #37182
While working on IR, we give pending nodes SSA ids after the main body of the function, and then we drop them in place during compaction. Inlining was using thse IDs to try to determine which basic block we're currently inlining into, but for pending blocks it was looking at the raw ID rather than the insertion position, corrupting the CFG. Fixes #37555 Fixes #37182
While working on IR, we give pending nodes SSA ids after the main body of the function, and then we drop them in place during compaction. Inlining was using thse IDs to try to determine which basic block we're currently inlining into, but for pending blocks it was looking at the raw ID rather than the insertion position, corrupting the CFG. Fixes #37555 Fixes #37182 (cherry picked from commit ace08d8)
As stated in the documentation, one should use a semicolon before keyword arguments. However some packages, perhaps for historical reasons (?), use a comma instead (including a few spurious usages instdlib
).In nightly, the following mwe throws a cryptic error message, while it worked in v1.5.
If the assertion is removed or the comma is replaced by a semicolon it works in nightly as well.
Perhaps it is related to #36774 ?
i guess it's not too much of an issue that incorrect usage gives rise to errors, but I guess it would be good to fix the handful of incorrect usages instdlib
, and possibly provide a better error message?The text was updated successfully, but these errors were encountered: