We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 459d84d + e88e7b9 commit 1c333b6Copy full SHA for 1c333b6
src/type_of.rs
@@ -288,7 +288,9 @@ impl<'tcx> LayoutGccExt<'tcx> for TyAndLayout<'tcx> {
288
Float(f) => cx.type_from_float(f),
289
Pointer(address_space) => {
290
// If we know the alignment, pick something better than i8.
291
- let pointee = if let Some(pointee) = self.pointee_info_at(cx, offset) {
+ let pointee = if let Some(pointee) = self.pointee_info_at(cx, offset)
292
+ && pointee.align > rustc_abi::Align::ONE
293
+ {
294
cx.type_pointee_for_align(pointee.align)
295
} else {
296
cx.type_i8()
0 commit comments