[Flang][OpenMP] Fix crash and IR errors for user-defined reduction on allocatable variables (#186765)
Fixes - https://github.com/llvm/llvm-project/issues/186743
This patch fixes flang crashes and invalid IR when using user-defined
reductions (declare reduction) with allocatable variables (scalars, 1D,
2D arrays). Previously, flang would either crash during FIR lowering or
emit bad LLVM IR (type mismatch in _FortranAAssign and llvm.memcpy).
The fix ensures that declare_reduction ops are created for the correct
boxed type when the reduction variable is allocatable or pointer. This
works for both integer and character types.