Skip to content

Commit

Permalink
fix #8464
Browse files Browse the repository at this point in the history
backport of 94093ce
  • Loading branch information
JeffBezanson authored and ivarne committed Sep 25, 2014
1 parent 0df9fd9 commit d66708f
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/cgutils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<ConstantExpr>(constant);
if (ce != NULL) {
if (ce->isCast()) {
return static_constant_instance(dyn_cast<Constant>(ce->getOperand(0)), jt);
}
}

assert(jl_is_tuple(jt));

size_t nargs = 0;
Expand Down

0 comments on commit d66708f

Please sign in to comment.