Assert that pure function definition and reduction function definition
have same type. Without this check, it is possible to write outside of
an allocated buffer's extent because the allocation is made based on
the pure definition's type and the update code uses the type of its
expression.