Skip to content

Commit

Permalink
Default-construct return value of unsupported input references.
Browse files Browse the repository at this point in the history
  • Loading branch information
bdice committed Aug 4, 2020
1 parent dcd48fd commit 12cdb22
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cpp/src/ast/ast.cu
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,15 @@ resolve_input_data_reference(detail::device_data_reference const device_data_ref
}
case detail::device_data_reference_type::LITERAL: {
// TODO: Fetch and return literal.
return static_cast<Element>(0);
return Element();
}
case detail::device_data_reference_type::INTERMEDIATE: {
return *reinterpret_cast<Element*>(
&thread_intermediate_storage[device_data_reference.data_index]);
}
default: {
// TODO: Error
return static_cast<Element>(0);
return Element();
}
}
}
Expand Down

0 comments on commit 12cdb22

Please sign in to comment.