Skip to content

Commit

Permalink
[Bug] [type] Fix frontend type check for reading a whole bit_struct
Browse files Browse the repository at this point in the history
  • Loading branch information
strongoier committed May 23, 2022
1 parent 7157b13 commit fedabe7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion taichi/ir/frontend_ir.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,8 @@ void GlobalVariableExpression::flatten(FlattenContext *ctx) {
void GlobalPtrExpression::type_check(CompileConfig *) {
// Currently, dimension compatibility check happens in Python
if (snode != nullptr) {
ret_type = snode->dt;
TI_ASSERT(snode->dt->is<BitStructType>());
ret_type = snode->dt->cast<BitStructType>()->get_physical_type();
} else if (var.is<GlobalVariableExpression>()) {
ret_type =
var.cast<GlobalVariableExpression>()->snode->dt->get_compute_type();
Expand Down

0 comments on commit fedabe7

Please sign in to comment.