diff options
| author | 12101111 <w12101111@gmail.com> | 2021-05-17 11:22:07 +0800 |
|---|---|---|
| committer | 12101111 <w12101111@gmail.com> | 2021-05-31 11:11:38 +0800 |
| commit | 61c1155d170292179568dce747afd9b8f91cc265 (patch) | |
| tree | 1a5f59180882c3b6a271b74941880695bf80aa7c /src/test/run-make-fulldeps | |
| parent | 9f75dbfa69ba8508fa7765305f75cd96dff06078 (diff) | |
| download | rust-61c1155d170292179568dce747afd9b8f91cc265.tar.gz rust-61c1155d170292179568dce747afd9b8f91cc265.zip | |
Build crtbengin.o/crtend.o from source code
Diffstat (limited to 'src/test/run-make-fulldeps')
| -rw-r--r-- | src/test/run-make-fulldeps/issue-47551/Makefile | 9 | ||||
| -rw-r--r-- | src/test/run-make-fulldeps/issue-47551/eh_frame-terminator.rs | 23 |
2 files changed, 32 insertions, 0 deletions
diff --git a/src/test/run-make-fulldeps/issue-47551/Makefile b/src/test/run-make-fulldeps/issue-47551/Makefile new file mode 100644 index 00000000000..f4495e6b671 --- /dev/null +++ b/src/test/run-make-fulldeps/issue-47551/Makefile @@ -0,0 +1,9 @@ +# only-linux +# ignore-32bit + +-include ../tools.mk + +all: + $(RUSTC) eh_frame-terminator.rs + $(call RUN,eh_frame-terminator) | $(CGREP) '1122334455667788' + objdump --dwarf=frames $(TMPDIR)/eh_frame-terminator | $(CGREP) 'ZERO terminator' diff --git a/src/test/run-make-fulldeps/issue-47551/eh_frame-terminator.rs b/src/test/run-make-fulldeps/issue-47551/eh_frame-terminator.rs new file mode 100644 index 00000000000..2f740dc4fac --- /dev/null +++ b/src/test/run-make-fulldeps/issue-47551/eh_frame-terminator.rs @@ -0,0 +1,23 @@ +// run-pass + +#![feature(backtrace)] +#[derive(Clone, Copy)] +struct Foo { + array: [u64; 10240], +} + +impl Foo { + const fn new() -> Self { + Self { + array: [0x1122_3344_5566_7788; 10240] + } + } +} + +static BAR: [Foo; 10240] = [Foo::new(); 10240]; + +fn main() { + let bt = std::backtrace::Backtrace::force_capture(); + println!("Hello, world! {:?}", bt); + println!("{:x}", BAR[0].array[0]); +} |
