From 3bcdd87399a86bfdd421c8dc850e332e62bfd380 Mon Sep 17 00:00:00 2001 From: Jeff Bezanson Date: Wed, 29 Sep 2021 11:04:17 -0400 Subject: [PATCH] fix verifier to allow GlobalRef as assignment RHS (#42417) --- 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