fix ctypes test alignment assumptions (closes #20946)

Patch by Andreas Schwab.
4 files changed