From 4b56ebbcf0a08937c027f351308175b8c61e593a Mon Sep 17 00:00:00 2001 From: Jeff Bezanson Date: Tue, 28 Sep 2021 15:57:51 -0400 Subject: [PATCH] fix verifier to allow GlobalRef as assignment RHS --- base/compiler/ssair/verify.jl | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/base/compiler/ssair/verify.jl b/base/compiler/ssair/verify.jl index 653923ace6e8e..c7c34edd84308 100644 --- a/base/compiler/ssair/verify.jl +++ b/base/compiler/ssair/verify.jl @@ -202,6 +202,10 @@ function verify_ir(ir::IRCode, print::Bool=true) @verify_error "SSAValue as assignment LHS" error("") end + if stmt.args[2] isa GlobalRef + # undefined GlobalRef as assignment RHS is OK + continue + end elseif stmt.head === :gc_preserve_end # We allow gc_preserve_end tokens to span across try/catch # blocks, which isn't allowed for regular SSA values, so