From d66708fed25a070df1e42e66ef28147b8e1541ae Mon Sep 17 00:00:00 2001 From: Jeff Bezanson Date: Thu, 25 Sep 2014 12:45:11 -0400 Subject: [PATCH] fix #8464 backport of 94093ce161dd662f93659028c8d --- src/cgutils.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/cgutils.cpp b/src/cgutils.cpp index 94119e9f492f2..09aeee6c5fb32 100644 --- a/src/cgutils.cpp +++ b/src/cgutils.cpp @@ -1477,6 +1477,14 @@ static jl_value_t *static_constant_instance(Constant *constant, jl_value_t *jt) return jl_new_bits(jt,&val); } + // issue #8464 + ConstantExpr *ce = dyn_cast(constant); + if (ce != NULL) { + if (ce->isCast()) { + return static_constant_instance(dyn_cast(ce->getOperand(0)), jt); + } + } + assert(jl_is_tuple(jt)); size_t nargs = 0;