2014-02-06 19:57:09 -08:00
|
|
|
//@ compile-flags:-g
|
2024-08-17 18:55:13 -04:00
|
|
|
|
2014-04-24 11:35:48 +02:00
|
|
|
// gdb-command:run
|
|
|
|
// gdb-command:whatis unit
|
|
|
|
// gdb-check:type = ()
|
|
|
|
// gdb-command:whatis b
|
|
|
|
// gdb-check:type = bool
|
|
|
|
// gdb-command:whatis i
|
2014-12-05 18:12:25 -08:00
|
|
|
// gdb-check:type = isize
|
2014-04-24 11:35:48 +02:00
|
|
|
// gdb-command:whatis c
|
|
|
|
// gdb-check:type = char
|
|
|
|
// gdb-command:whatis i8
|
|
|
|
// gdb-check:type = i8
|
|
|
|
// gdb-command:whatis i16
|
|
|
|
// gdb-check:type = i16
|
|
|
|
// gdb-command:whatis i32
|
|
|
|
// gdb-check:type = i32
|
|
|
|
// gdb-command:whatis i64
|
|
|
|
// gdb-check:type = i64
|
|
|
|
// gdb-command:whatis u
|
2014-12-05 18:12:25 -08:00
|
|
|
// gdb-check:type = usize
|
2014-04-24 11:35:48 +02:00
|
|
|
// gdb-command:whatis u8
|
|
|
|
// gdb-check:type = u8
|
|
|
|
// gdb-command:whatis u16
|
|
|
|
// gdb-check:type = u16
|
|
|
|
// gdb-command:whatis u32
|
|
|
|
// gdb-check:type = u32
|
|
|
|
// gdb-command:whatis u64
|
|
|
|
// gdb-check:type = u64
|
2024-06-26 18:18:32 +01:00
|
|
|
// gdb-command:whatis f16
|
|
|
|
// gdb-check:type = f16
|
2014-04-24 11:35:48 +02:00
|
|
|
// gdb-command:whatis f32
|
|
|
|
// gdb-check:type = f32
|
|
|
|
// gdb-command:whatis f64
|
|
|
|
// gdb-check:type = f64
|
2015-07-13 21:50:21 +02:00
|
|
|
// gdb-command:whatis fnptr
|
2024-08-09 22:33:40 -04:00
|
|
|
// gdb-check:type = *mut fn ()
|
2014-04-24 11:35:48 +02:00
|
|
|
// gdb-command:info functions _yyy
|
2024-08-17 17:31:49 -04:00
|
|
|
// gdb-check:static fn basic_types_metadata::_yyy();
|
2015-07-28 00:29:05 +02:00
|
|
|
// gdb-command:ptype closure_0
|
2024-08-17 17:31:49 -04:00
|
|
|
// gdb-check: type = struct basic_types_metadata::main::{closure_env#0}
|
2015-07-28 00:29:05 +02:00
|
|
|
// gdb-command:ptype closure_1
|
2024-08-17 17:31:49 -04:00
|
|
|
// gdb-check: type = struct basic_types_metadata::main::{closure_env#1} {
|
|
|
|
// gdb-check: *mut bool,
|
|
|
|
// gdb-check: }
|
2015-07-28 00:29:05 +02:00
|
|
|
// gdb-command:ptype closure_2
|
2024-08-17 17:31:49 -04:00
|
|
|
// gdb-check: type = struct basic_types_metadata::main::{closure_env#2} {
|
|
|
|
// gdb-check: *mut bool,
|
|
|
|
// gdb-check: *mut isize,
|
|
|
|
// gdb-check: }
|
2015-07-28 00:29:05 +02:00
|
|
|
|
|
|
|
//
|
2014-04-24 11:35:48 +02:00
|
|
|
// gdb-command:continue
|
2013-11-02 14:38:25 -04:00
|
|
|
|
2014-10-27 15:37:07 -07:00
|
|
|
#![allow(unused_variables)]
|
2015-09-19 16:33:47 -04:00
|
|
|
#![feature(omit_gdb_pretty_printer_section)]
|
2014-12-03 14:48:18 -08:00
|
|
|
#![omit_gdb_pretty_printer_section]
|
2024-06-26 18:18:32 +01:00
|
|
|
#![feature(f16)]
|
2013-11-02 14:38:25 -04:00
|
|
|
|
|
|
|
fn main() {
|
|
|
|
let unit: () = ();
|
|
|
|
let b: bool = false;
|
2014-12-05 18:12:25 -08:00
|
|
|
let i: isize = -1;
|
2013-11-02 14:38:25 -04:00
|
|
|
let c: char = 'a';
|
|
|
|
let i8: i8 = 68;
|
|
|
|
let i16: i16 = -16;
|
|
|
|
let i32: i32 = -32;
|
|
|
|
let i64: i64 = -64;
|
2014-12-05 18:12:25 -08:00
|
|
|
let u: usize = 1;
|
2013-11-02 14:38:25 -04:00
|
|
|
let u8: u8 = 100;
|
|
|
|
let u16: u16 = 16;
|
|
|
|
let u32: u32 = 32;
|
|
|
|
let u64: u64 = 64;
|
2024-06-26 18:18:32 +01:00
|
|
|
let f16: f16 = 1.5;
|
2013-11-02 14:38:25 -04:00
|
|
|
let f32: f32 = 2.5;
|
|
|
|
let f64: f64 = 3.5;
|
2015-07-13 21:50:21 +02:00
|
|
|
let fnptr : fn() = _zzz;
|
2015-07-28 00:29:05 +02:00
|
|
|
let closure_0 = || {};
|
|
|
|
let closure_1 = || { b; };
|
|
|
|
let closure_2 = || { if b { i } else { i }; };
|
2014-10-29 10:13:29 +04:00
|
|
|
_zzz(); // #break
|
2015-01-25 22:05:03 +01:00
|
|
|
if 1 == 1 { _yyy(); }
|
2013-11-02 14:38:25 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
fn _zzz() {()}
|
2014-10-09 15:17:22 -04:00
|
|
|
fn _yyy() -> ! {panic!()}
|