]> git.lizzy.rs Git - rust.git/blob - src/test/debuginfo/basic-types-globals-metadata.rs
Auto merge of #28816 - petrochenkov:unistruct, r=nrc
[rust.git] / src / test / debuginfo / basic-types-globals-metadata.rs
1 // Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT
2 // file at the top-level directory of this distribution and at
3 // http://rust-lang.org/COPYRIGHT.
4 //
5 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8 // option. This file may not be copied, modified, or distributed
9 // except according to those terms.
10
11 // min-lldb-version: 310
12
13 // compile-flags:-g
14 // gdb-command:run
15 // gdb-command:whatis 'basic_types_globals_metadata::B'
16 // gdb-check:type = bool
17 // gdb-command:whatis 'basic_types_globals_metadata::I'
18 // gdb-check:type = isize
19 // gdb-command:whatis 'basic_types_globals_metadata::C'
20 // gdb-check:type = char
21 // gdb-command:whatis 'basic_types_globals_metadata::I8'
22 // gdb-check:type = i8
23 // gdb-command:whatis 'basic_types_globals_metadata::I16'
24 // gdb-check:type = i16
25 // gdb-command:whatis 'basic_types_globals_metadata::I32'
26 // gdb-check:type = i32
27 // gdb-command:whatis 'basic_types_globals_metadata::I64'
28 // gdb-check:type = i64
29 // gdb-command:whatis 'basic_types_globals_metadata::U'
30 // gdb-check:type = usize
31 // gdb-command:whatis 'basic_types_globals_metadata::U8'
32 // gdb-check:type = u8
33 // gdb-command:whatis 'basic_types_globals_metadata::U16'
34 // gdb-check:type = u16
35 // gdb-command:whatis 'basic_types_globals_metadata::U32'
36 // gdb-check:type = u32
37 // gdb-command:whatis 'basic_types_globals_metadata::U64'
38 // gdb-check:type = u64
39 // gdb-command:whatis 'basic_types_globals_metadata::F32'
40 // gdb-check:type = f32
41 // gdb-command:whatis 'basic_types_globals_metadata::F64'
42 // gdb-check:type = f64
43 // gdb-command:continue
44
45 #![allow(unused_variables)]
46 #![allow(dead_code)]
47 #![feature(omit_gdb_pretty_printer_section)]
48 #![omit_gdb_pretty_printer_section]
49
50 // N.B. These are `mut` only so they don't constant fold away.
51 static mut B: bool = false;
52 static mut I: isize = -1;
53 static mut C: char = 'a';
54 static mut I8: i8 = 68;
55 static mut I16: i16 = -16;
56 static mut I32: i32 = -32;
57 static mut I64: i64 = -64;
58 static mut U: usize = 1;
59 static mut U8: u8 = 100;
60 static mut U16: u16 = 16;
61 static mut U32: u32 = 32;
62 static mut U64: u64 = 64;
63 static mut F32: f32 = 2.5;
64 static mut F64: f64 = 3.5;
65
66 fn main() {
67     _zzz(); // #break
68
69     let a = unsafe { (B, I, C, I8, I16, I32, I64, U, U8, U16, U32, U64, F32, F64) };
70 }
71
72 fn _zzz() {()}