2013-06-19 09:26:35 -05:00
|
|
|
// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
|
|
|
|
// file at the top-level directory of this distribution and at
|
|
|
|
// http://rust-lang.org/COPYRIGHT.
|
|
|
|
//
|
|
|
|
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
|
|
|
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
|
|
|
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
|
|
|
// option. This file may not be copied, modified, or distributed
|
|
|
|
// except according to those terms.
|
|
|
|
|
|
|
|
// compile-flags:-Z extra-debug-info
|
|
|
|
// debugger:set print pretty off
|
2013-09-06 09:00:08 -05:00
|
|
|
// debugger:rbreak zzz
|
2013-06-19 09:26:35 -05:00
|
|
|
// debugger:run
|
|
|
|
// debugger:finish
|
|
|
|
|
2013-06-20 09:45:47 -05:00
|
|
|
// debugger:print no_padding16
|
2013-06-19 09:26:35 -05:00
|
|
|
// check:$1 = {x = 10000, y = -10001}
|
|
|
|
|
2013-06-20 09:45:47 -05:00
|
|
|
// debugger:print no_padding32
|
2013-06-19 09:26:35 -05:00
|
|
|
// check:$2 = {x = -10002, y = -10003.5, z = 10004}
|
|
|
|
|
2013-06-20 09:45:47 -05:00
|
|
|
// debugger:print no_padding64
|
2013-06-19 09:26:35 -05:00
|
|
|
// check:$3 = {x = -10005.5, y = 10006, z = 10007}
|
|
|
|
|
2013-06-20 09:45:47 -05:00
|
|
|
// debugger:print no_padding163264
|
2013-06-19 09:26:35 -05:00
|
|
|
// check:$4 = {a = -10008, b = 10009, c = 10010, d = 10011}
|
|
|
|
|
2013-06-20 09:45:47 -05:00
|
|
|
// debugger:print internal_padding
|
2013-06-19 09:26:35 -05:00
|
|
|
// check:$5 = {x = 10012, y = -10013}
|
|
|
|
|
2013-06-20 09:45:47 -05:00
|
|
|
// debugger:print padding_at_end
|
2013-06-19 09:26:35 -05:00
|
|
|
// check:$6 = {x = -10014, y = 10015}
|
|
|
|
|
2013-08-17 10:37:42 -05:00
|
|
|
#[allow(unused_variable)];
|
2013-06-19 09:26:35 -05:00
|
|
|
|
|
|
|
struct NoPadding16 {
|
|
|
|
x: u16,
|
|
|
|
y: i16
|
|
|
|
}
|
2013-06-20 09:45:47 -05:00
|
|
|
|
2013-06-19 09:26:35 -05:00
|
|
|
struct NoPadding32 {
|
|
|
|
x: i32,
|
|
|
|
y: f32,
|
|
|
|
z: u32
|
|
|
|
}
|
|
|
|
|
|
|
|
struct NoPadding64 {
|
|
|
|
x: f64,
|
|
|
|
y: i64,
|
|
|
|
z: u64
|
|
|
|
}
|
|
|
|
|
|
|
|
struct NoPadding163264 {
|
|
|
|
a: i16,
|
|
|
|
b: u16,
|
|
|
|
c: i32,
|
|
|
|
d: u64
|
|
|
|
}
|
|
|
|
|
|
|
|
struct InternalPadding {
|
|
|
|
x: u16,
|
|
|
|
y: i64
|
|
|
|
}
|
|
|
|
|
|
|
|
struct PaddingAtEnd {
|
|
|
|
x: i64,
|
|
|
|
y: u16
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
2013-06-20 09:45:47 -05:00
|
|
|
let no_padding16 = NoPadding16 { x: 10000, y: -10001 };
|
|
|
|
let no_padding32 = NoPadding32 { x: -10002, y: -10003.5, z: 10004 };
|
|
|
|
let no_padding64 = NoPadding64 { x: -10005.5, y: 10006, z: 10007 };
|
|
|
|
let no_padding163264 = NoPadding163264 { a: -10008, b: 10009, c: 10010, d: 10011 };
|
|
|
|
|
|
|
|
let internal_padding = InternalPadding { x: 10012, y: -10013 };
|
|
|
|
let padding_at_end = PaddingAtEnd { x: -10014, y: 10015 };
|
2013-06-19 09:26:35 -05:00
|
|
|
|
|
|
|
zzz();
|
|
|
|
}
|
|
|
|
|
2013-08-17 10:37:42 -05:00
|
|
|
fn zzz() {()}
|