1 // Caveat - gdb doesn't know about UTF-32 character encoding and will print a
2 // rust char as only its numerical value.
4 // min-lldb-version: 310
5 // min-gdb-version: 8.0
7 // revisions: lto no-lto
11 // [lto] compile-flags:-C lto
12 // [lto] no-prefer-dynamic
15 // gdbg-command:print 'basic_types_globals::B'
16 // gdbr-command:print B
17 // gdb-check:$1 = false
18 // gdbg-command:print 'basic_types_globals::I'
19 // gdbr-command:print I
21 // gdbg-command:print 'basic_types_globals::C'
22 // gdbr-command:print/d C
25 // gdbg-command:print/d 'basic_types_globals::I8'
26 // gdbr-command:print I8
28 // gdbg-command:print 'basic_types_globals::I16'
29 // gdbr-command:print I16
31 // gdbg-command:print 'basic_types_globals::I32'
32 // gdbr-command:print I32
34 // gdbg-command:print 'basic_types_globals::I64'
35 // gdbr-command:print I64
37 // gdbg-command:print 'basic_types_globals::U'
38 // gdbr-command:print U
40 // gdbg-command:print/d 'basic_types_globals::U8'
41 // gdbr-command:print U8
43 // gdbg-command:print 'basic_types_globals::U16'
44 // gdbr-command:print U16
46 // gdbg-command:print 'basic_types_globals::U32'
47 // gdbr-command:print U32
49 // gdbg-command:print 'basic_types_globals::U64'
50 // gdbr-command:print U64
52 // gdbg-command:print 'basic_types_globals::F32'
53 // gdbr-command:print F32
54 // gdb-check:$13 = 2.5
55 // gdbg-command:print 'basic_types_globals::F64'
56 // gdbr-command:print F64
57 // gdb-check:$14 = 3.5
58 // gdb-command:continue
60 #![allow(unused_variables)]
61 #![feature(omit_gdb_pretty_printer_section)]
62 #![omit_gdb_pretty_printer_section]
64 // N.B. These are `mut` only so they don't constant fold away.
65 static mut B: bool = false;
66 static mut I: isize = -1;
67 static mut C: char = 'a';
68 static mut I8: i8 = 68;
69 static mut I16: i16 = -16;
70 static mut I32: i32 = -32;
71 static mut I64: i64 = -64;
72 static mut U: usize = 1;
73 static mut U8: u8 = 100;
74 static mut U16: u16 = 16;
75 static mut U32: u32 = 32;
76 static mut U64: u64 = 64;
77 static mut F32: f32 = 2.5;
78 static mut F64: f64 = 3.5;
83 let a = unsafe { (B, I, C, I8, I16, I32, I64, U, U8, U16, U32, U64, F32, F64) };