ei_declare_aligned_stack_constructed_variable ignores alignment requirement of custom types

Submitted by Christoph Hertzberg @chhtz

Assigned to Nobody

Link to original bugzilla bug (#1758)
Version: 3.3 (current stable)

Description

As found on this SO post:
https://stackoverflow.com/questions/58366939/eigen3-boost-mpfr-segfault-when-alignment-is-disabled

Eigen fails to work with MPFR if compiled with -DEIGEN_MAX_ALIGN_BYTES=0.
The reason appears to be that the specific type used in the example requires 16 byte alignment, which however is ignored by ei_declare_aligned_stack_constructed_variable.

Similar issues likely arise for custom types which require more than the standard alignment.

Blocking

#1608

Edited by Antonio Sánchez