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
8 // compile-flags:-g -C lto
10 // gdbg-command:print 'basic_types_globals::B'
11 // gdbr-command:print B
12 // gdb-check:$1 = false
13 // gdbg-command:print 'basic_types_globals::I'
14 // gdbr-command:print I
16 // gdbg-command:print 'basic_types_globals::C'
17 // gdbr-command:print/d C
20 // gdbg-command:print/d 'basic_types_globals::I8'
21 // gdbr-command:print I8
23 // gdbg-command:print 'basic_types_globals::I16'
24 // gdbr-command:print I16
26 // gdbg-command:print 'basic_types_globals::I32'
27 // gdbr-command:print I32
29 // gdbg-command:print 'basic_types_globals::I64'
30 // gdbr-command:print I64
32 // gdbg-command:print 'basic_types_globals::U'
33 // gdbr-command:print U
35 // gdbg-command:print/d 'basic_types_globals::U8'
36 // gdbr-command:print U8
38 // gdbg-command:print 'basic_types_globals::U16'
39 // gdbr-command:print U16
41 // gdbg-command:print 'basic_types_globals::U32'
42 // gdbr-command:print U32
44 // gdbg-command:print 'basic_types_globals::U64'
45 // gdbr-command:print U64
47 // gdbg-command:print 'basic_types_globals::F32'
48 // gdbr-command:print F32
49 // gdb-check:$13 = 2.5
50 // gdbg-command:print 'basic_types_globals::F64'
51 // gdbr-command:print F64
52 // gdb-check:$14 = 3.5
53 // gdb-command:continue
55 #![allow(unused_variables)]
56 #![feature(omit_gdb_pretty_printer_section)]
57 #![omit_gdb_pretty_printer_section]
59 // N.B. These are `mut` only so they don't constant fold away.
60 static mut B: bool = false;
61 static mut I: isize = -1;
62 static mut C: char = 'a';
63 static mut I8: i8 = 68;
64 static mut I16: i16 = -16;
65 static mut I32: i32 = -32;
66 static mut I64: i64 = -64;
67 static mut U: usize = 1;
68 static mut U8: u8 = 100;
69 static mut U16: u16 = 16;
70 static mut U32: u32 = 32;
71 static mut U64: u64 = 64;
72 static mut F32: f32 = 2.5;
73 static mut F64: f64 = 3.5;
78 let a = unsafe { (B, I, C, I8, I16, I32, I64, U, U8, U16, U32, U64, F32, F64) };