Skip to content

Conversation

JeffBezanson
Copy link
Member

This fixes this odd failure in ODE.jl:

ERROR: LoadError: MethodError: no method matching size(::Symbol, ::Int64)
Closest candidates are:
  size(!Matched::BitArray{1}, ::Integer) at bitarray.jl:81
  size(!Matched::Tuple, ::Integer) at tuple.jl:22
  size(!Matched::Number, ::Integer) at number.jl:63
  ...
Stacktrace:
 [1] oderosenbrock(::var"#3#4", ::Float64, ::Array{Float64,1}, ::Float64, ::Symbol, ::Array{Float64,2}, ::Array{Float64,2}; jacobian::Nothing, kwargs::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}) at /home/jeff/.julia/packages/ODE/OyDLv/src/ODE.jl:386
 [2] #ode4s_s#27 at /home/jeff/.julia/packages/ODE/OyDLv/src/ODE.jl:432 [inlined]
 [3] ode4s_s(::Function, ::Float64, ::Array{Float64,1}) at /home/jeff/.julia/packages/ODE/OyDLv/src/ODE.jl:432

The getfield elim pass was treating a GlobalRef as literal data and fetching the Symbol out of it. That was exposed by #32437, which allowed inlining the resulting Symbol constant.

@JeffBezanson JeffBezanson added bugfix This change fixes an existing bug compiler:optimizer Optimization passes (mostly in base/compiler/ssair/) backport 1.4 labels Jan 9, 2020
@KristofferC KristofferC merged commit 22817ea into master Jan 9, 2020
@KristofferC KristofferC deleted the jb/getfieldglobalref branch January 9, 2020 09:21
KristofferC pushed a commit that referenced this pull request Jan 9, 2020
@KristofferC KristofferC mentioned this pull request Jan 9, 2020
28 tasks
KristofferC pushed a commit that referenced this pull request Apr 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix This change fixes an existing bug compiler:optimizer Optimization passes (mostly in base/compiler/ssair/)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants