]> git.lizzy.rs Git - rust.git/blob - tests/debuginfo/pretty-huge-vec.rs
Merge commit '7d53619064ab7045c383644cb445052d2a3d46db' into sync_cg_clif-2023-02-09
[rust.git] / tests / debuginfo / pretty-huge-vec.rs
1 // ignore-windows failing on win32 bot
2 // ignore-freebsd: gdb package too new
3 // ignore-android: FIXME(#10381)
4 // compile-flags:-g
5 // min-gdb-version: 8.1
6 // min-lldb-version: 310
7
8 // === GDB TESTS ===================================================================================
9
10 // gdb-command: run
11
12 // gdb-command: print vec
13 // gdb-check:$1 = Vec(size=1000000000) = {[...]...}
14
15 // gdb-command: print slice
16 // gdb-check:$2 = &[u8](size=1000000000) = {[...]...}
17
18 #![allow(unused_variables)]
19
20 fn main() {
21
22     // Vec
23     let mut vec: Vec<u8> = Vec::with_capacity(1_000_000_000);
24     unsafe{ vec.set_len(1_000_000_000) }
25     let slice = &vec[..];
26
27     zzz(); // #break
28 }
29
30 fn zzz() { () }