diff options
| author | Oliver Schneider <git-no-reply-9879165716479413131@oli-obk.de> | 2018-05-12 18:47:20 +0200 |
|---|---|---|
| committer | Oliver Schneider <github35764891676564198441@oli-obk.de> | 2018-05-19 14:24:24 +0200 |
| commit | 8b99c61701cd3230bb24fba970d2f400e6e09fa1 (patch) | |
| tree | 8fbb33beb424a2aef89841af69dd3df7f3e3249f /src/test/codegen | |
| parent | c95e1cccc9c248789230a54ecfd87971a04d5c0c (diff) | |
| download | rust-8b99c61701cd3230bb24fba970d2f400e6e09fa1.tar.gz rust-8b99c61701cd3230bb24fba970d2f400e6e09fa1.zip | |
Ensure that statics are always ByRef
Diffstat (limited to 'src/test/codegen')
| -rw-r--r-- | src/test/codegen/link_section.rs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/test/codegen/link_section.rs b/src/test/codegen/link_section.rs index 1879002e7f3..415ee6eb7ea 100644 --- a/src/test/codegen/link_section.rs +++ b/src/test/codegen/link_section.rs @@ -12,11 +12,17 @@ #![crate_type = "lib"] -// CHECK: @VAR1 = constant i32 1, section ".test_one" +// CHECK: @VAR1 = constant <{ [4 x i8] }> <{ [4 x i8] c"\01\00\00\00" }>, section ".test_one" #[no_mangle] #[link_section = ".test_one"] +#[cfg(target_endian = "little")] pub static VAR1: u32 = 1; +#[no_mangle] +#[link_section = ".test_one"] +#[cfg(target_endian = "big")] +pub static VAR1: u32 = 0x01000000; + pub enum E { A(u32), B(f32) |
