https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107498
--- Comment #2 from Jessica Clarke <jrtc27 at jrtc27 dot com> --- #define mp_lower mp_pb.pb.pb_lower #define mp_upper mp_pb.pb.pb_upper #define mp_pages mp_pb.pb_pages union { struct { indx_t pb_lower; /**< lower bound of free space */ indx_t pb_upper; /**< upper bound of free space */ } pb; uint32_t pb_pages; /**< number of overflow pages */ } mp_pb; That's the code. GCC is perfectly ok to optimise that to do a 32-bit load. If it has an alignment fault that's OpenLDAP's problem, the uint32_t there means it must be 32-bit aligned if you don't want UB.