]> git.lizzy.rs Git - rust.git/blob - src/test/debuginfo/basic-types-globals-metadata.rs
Auto merge of #54624 - arielb1:evaluate-outlives, r=nikomatsakis
[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 // ignore-gdb // Test temporarily ignored due to debuginfo tests being disabled, see PR 47155
13
14 // compile-flags:-g
15 // gdb-command:run
16 // gdbg-command:whatis 'basic_types_globals_metadata::B'
17 // gdbr-command:whatis basic_types_globals_metadata::B
18 // gdb-check:type = bool
19 // gdbg-command:whatis 'basic_types_globals_metadata::I'
20 // gdbr-command:whatis basic_types_globals_metadata::I
21 // gdb-check:type = isize
22 // gdbg-command:whatis 'basic_types_globals_metadata::C'
23 // gdbr-command:whatis basic_types_globals_metadata::C
24 // gdb-check:type = char
25 // gdbg-command:whatis 'basic_types_globals_metadata::I8'
26 // gdbr-command:whatis basic_types_globals_metadata::I8
27 // gdb-check:type = i8
28 // gdbg-command:whatis 'basic_types_globals_metadata::I16'
29 // gdbr-command:whatis basic_types_globals_metadata::I16
30 // gdb-check:type = i16
31 // gdbg-command:whatis 'basic_types_globals_metadata::I32'
32 // gdbr-command:whatis basic_types_globals_metadata::I32
33 // gdb-check:type = i32
34 // gdbg-command:whatis 'basic_types_globals_metadata::I64'
35 // gdbr-command:whatis basic_types_globals_metadata::I64
36 // gdb-check:type = i64
37 // gdbg-command:whatis 'basic_types_globals_metadata::U'
38 // gdbr-command:whatis basic_types_globals_metadata::U
39 // gdb-check:type = usize
40 // gdbg-command:whatis 'basic_types_globals_metadata::U8'
41 // gdbr-command:whatis basic_types_globals_metadata::U8
42 // gdb-check:type = u8
43 // gdbg-command:whatis 'basic_types_globals_metadata::U16'
44 // gdbr-command:whatis basic_types_globals_metadata::U16
45 // gdb-check:type = u16
46 // gdbg-command:whatis 'basic_types_globals_metadata::U32'
47 // gdbr-command:whatis basic_types_globals_metadata::U32
48 // gdb-check:type = u32
49 // gdbg-command:whatis 'basic_types_globals_metadata::U64'
50 // gdbr-command:whatis basic_types_globals_metadata::U64
51 // gdb-check:type = u64
52 // gdbg-command:whatis 'basic_types_globals_metadata::F32'
53 // gdbr-command:whatis basic_types_globals_metadata::F32
54 // gdb-check:type = f32
55 // gdbg-command:whatis 'basic_types_globals_metadata::F64'
56 // gdbr-command:whatis basic_types_globals_metadata::F64
57 // gdb-check:type = f64
58 // gdb-command:continue
59
60 #![allow(unused_variables)]
61 #![allow(dead_code)]
62 #![feature(omit_gdb_pretty_printer_section)]
63 #![omit_gdb_pretty_printer_section]
64
65 // N.B. These are `mut` only so they don't constant fold away.
66 static mut B: bool = false;
67 static mut I: isize = -1;
68 static mut C: char = 'a';
69 static mut I8: i8 = 68;
70 static mut I16: i16 = -16;
71 static mut I32: i32 = -32;
72 static mut I64: i64 = -64;
73 static mut U: usize = 1;
74 static mut U8: u8 = 100;
75 static mut U16: u16 = 16;
76 static mut U32: u32 = 32;
77 static mut U64: u64 = 64;
78 static mut F32: f32 = 2.5;
79 static mut F64: f64 = 3.5;
80
81 fn main() {
82     _zzz(); // #break
83
84     let a = unsafe { (B, I, C, I8, I16, I32, I64, U, U8, U16, U32, U64, F32, F64) };
85 }
86
87 fn _zzz() {()}