2014-10-09 09:31:03 -05:00
|
|
|
// min-lldb-version: 310
|
2018-01-03 12:24:25 -06:00
|
|
|
// ignore-gdb // Test temporarily ignored due to debuginfo tests being disabled, see PR 47155
|
2014-04-24 04:35:48 -05:00
|
|
|
|
|
|
|
// compile-flags:-g
|
2014-07-09 07:46:09 -05:00
|
|
|
|
|
|
|
// === GDB TESTS ===================================================================================
|
|
|
|
|
2014-04-24 04:35:48 -05:00
|
|
|
// gdb-command:run
|
|
|
|
|
2016-10-25 16:32:04 -05:00
|
|
|
// gdbg-command:print 'lexical_scopes_in_block_expression::MUT_INT'
|
|
|
|
// gdbr-command:print lexical_scopes_in_block_expression::MUT_INT
|
2014-04-24 04:35:48 -05:00
|
|
|
// gdb-check:$1 = 0
|
|
|
|
|
|
|
|
// STRUCT EXPRESSION
|
|
|
|
// gdb-command:print val
|
|
|
|
// gdb-check:$2 = -1
|
|
|
|
// gdb-command:print ten
|
|
|
|
// gdb-check:$3 = 10
|
|
|
|
// gdb-command:continue
|
|
|
|
|
|
|
|
// gdb-command:print val
|
|
|
|
// gdb-check:$4 = 11
|
2016-10-25 16:32:04 -05:00
|
|
|
// gdbg-command:print 'lexical_scopes_in_block_expression::MUT_INT'
|
|
|
|
// gdbr-command:print lexical_scopes_in_block_expression::MUT_INT
|
2014-04-24 04:35:48 -05:00
|
|
|
// gdb-check:$5 = 1
|
|
|
|
// gdb-command:print ten
|
|
|
|
// gdb-check:$6 = 10
|
|
|
|
// gdb-command:continue
|
|
|
|
|
|
|
|
// gdb-command:print val
|
|
|
|
// gdb-check:$7 = -1
|
|
|
|
// gdb-command:print ten
|
|
|
|
// gdb-check:$8 = 10
|
|
|
|
// gdb-command:continue
|
|
|
|
|
|
|
|
// FUNCTION CALL
|
|
|
|
// gdb-command:print val
|
|
|
|
// gdb-check:$9 = -1
|
|
|
|
// gdb-command:print ten
|
|
|
|
// gdb-check:$10 = 10
|
|
|
|
// gdb-command:continue
|
|
|
|
|
|
|
|
// gdb-command:print val
|
|
|
|
// gdb-check:$11 = 12
|
2016-10-25 16:32:04 -05:00
|
|
|
// gdbg-command:print 'lexical_scopes_in_block_expression::MUT_INT'
|
|
|
|
// gdbr-command:print lexical_scopes_in_block_expression::MUT_INT
|
2014-04-24 04:35:48 -05:00
|
|
|
// gdb-check:$12 = 2
|
|
|
|
// gdb-command:print ten
|
|
|
|
// gdb-check:$13 = 10
|
|
|
|
// gdb-command:continue
|
|
|
|
|
|
|
|
// gdb-command:print val
|
|
|
|
// gdb-check:$14 = -1
|
|
|
|
// gdb-command:print ten
|
|
|
|
// gdb-check:$15 = 10
|
|
|
|
// gdb-command:continue
|
|
|
|
|
|
|
|
// TUPLE EXPRESSION
|
|
|
|
// gdb-command:print val
|
|
|
|
// gdb-check:$16 = -1
|
|
|
|
// gdb-command:print ten
|
|
|
|
// gdb-check:$17 = 10
|
|
|
|
// gdb-command:continue
|
|
|
|
|
|
|
|
// gdb-command:print val
|
|
|
|
// gdb-check:$18 = 13
|
2016-10-25 16:32:04 -05:00
|
|
|
// gdbg-command:print 'lexical_scopes_in_block_expression::MUT_INT'
|
|
|
|
// gdbr-command:print lexical_scopes_in_block_expression::MUT_INT
|
2014-04-24 04:35:48 -05:00
|
|
|
// gdb-check:$19 = 3
|
|
|
|
// gdb-command:print ten
|
|
|
|
// gdb-check:$20 = 10
|
|
|
|
// gdb-command:continue
|
|
|
|
|
|
|
|
// gdb-command:print val
|
|
|
|
// gdb-check:$21 = -1
|
|
|
|
// gdb-command:print ten
|
|
|
|
// gdb-check:$22 = 10
|
|
|
|
// gdb-command:continue
|
|
|
|
|
|
|
|
// VEC EXPRESSION
|
|
|
|
// gdb-command:print val
|
|
|
|
// gdb-check:$23 = -1
|
|
|
|
// gdb-command:print ten
|
|
|
|
// gdb-check:$24 = 10
|
|
|
|
// gdb-command:continue
|
|
|
|
|
|
|
|
// gdb-command:print val
|
|
|
|
// gdb-check:$25 = 14
|
2016-10-25 16:32:04 -05:00
|
|
|
// gdbg-command:print 'lexical_scopes_in_block_expression::MUT_INT'
|
|
|
|
// gdbr-command:print lexical_scopes_in_block_expression::MUT_INT
|
2014-04-24 04:35:48 -05:00
|
|
|
// gdb-check:$26 = 4
|
|
|
|
// gdb-command:print ten
|
|
|
|
// gdb-check:$27 = 10
|
|
|
|
// gdb-command:continue
|
|
|
|
|
|
|
|
// gdb-command:print val
|
|
|
|
// gdb-check:$28 = -1
|
|
|
|
// gdb-command:print ten
|
|
|
|
// gdb-check:$29 = 10
|
|
|
|
// gdb-command:continue
|
|
|
|
|
|
|
|
// REPEAT VEC EXPRESSION
|
|
|
|
// gdb-command:print val
|
|
|
|
// gdb-check:$30 = -1
|
|
|
|
// gdb-command:print ten
|
|
|
|
// gdb-check:$31 = 10
|
|
|
|
// gdb-command:continue
|
|
|
|
|
|
|
|
// gdb-command:print val
|
|
|
|
// gdb-check:$32 = 15
|
2016-10-25 16:32:04 -05:00
|
|
|
// gdbg-command:print 'lexical_scopes_in_block_expression::MUT_INT'
|
|
|
|
// gdbr-command:print lexical_scopes_in_block_expression::MUT_INT
|
2014-04-24 04:35:48 -05:00
|
|
|
// gdb-check:$33 = 5
|
|
|
|
// gdb-command:print ten
|
|
|
|
// gdb-check:$34 = 10
|
|
|
|
// gdb-command:continue
|
|
|
|
|
|
|
|
// gdb-command:print val
|
|
|
|
// gdb-check:$35 = -1
|
|
|
|
// gdb-command:print ten
|
|
|
|
// gdb-check:$36 = 10
|
|
|
|
// gdb-command:continue
|
|
|
|
|
|
|
|
// ASSIGNMENT EXPRESSION
|
|
|
|
// gdb-command:print val
|
|
|
|
// gdb-check:$37 = -1
|
|
|
|
// gdb-command:print ten
|
|
|
|
// gdb-check:$38 = 10
|
|
|
|
// gdb-command:continue
|
|
|
|
|
|
|
|
// gdb-command:print val
|
|
|
|
// gdb-check:$39 = 16
|
2016-10-25 16:32:04 -05:00
|
|
|
// gdbg-command:print 'lexical_scopes_in_block_expression::MUT_INT'
|
|
|
|
// gdbr-command:print lexical_scopes_in_block_expression::MUT_INT
|
2014-04-24 04:35:48 -05:00
|
|
|
// gdb-check:$40 = 6
|
|
|
|
// gdb-command:print ten
|
|
|
|
// gdb-check:$41 = 10
|
|
|
|
// gdb-command:continue
|
|
|
|
|
|
|
|
// gdb-command:print val
|
|
|
|
// gdb-check:$42 = -1
|
|
|
|
// gdb-command:print ten
|
|
|
|
// gdb-check:$43 = 10
|
|
|
|
// gdb-command:continue
|
|
|
|
|
|
|
|
|
|
|
|
// ARITHMETIC EXPRESSION
|
|
|
|
// gdb-command:print val
|
|
|
|
// gdb-check:$44 = -1
|
|
|
|
// gdb-command:print ten
|
|
|
|
// gdb-check:$45 = 10
|
|
|
|
// gdb-command:continue
|
|
|
|
|
|
|
|
// gdb-command:print val
|
|
|
|
// gdb-check:$46 = 17
|
2016-10-25 16:32:04 -05:00
|
|
|
// gdbg-command:print 'lexical_scopes_in_block_expression::MUT_INT'
|
|
|
|
// gdbr-command:print lexical_scopes_in_block_expression::MUT_INT
|
2014-04-24 04:35:48 -05:00
|
|
|
// gdb-check:$47 = 7
|
|
|
|
// gdb-command:print ten
|
|
|
|
// gdb-check:$48 = 10
|
|
|
|
// gdb-command:continue
|
|
|
|
|
|
|
|
// gdb-command:print val
|
|
|
|
// gdb-check:$49 = -1
|
|
|
|
// gdb-command:print ten
|
|
|
|
// gdb-check:$50 = 10
|
|
|
|
// gdb-command:continue
|
|
|
|
|
|
|
|
// INDEX EXPRESSION
|
|
|
|
// gdb-command:print val
|
|
|
|
// gdb-check:$51 = -1
|
|
|
|
// gdb-command:print ten
|
|
|
|
// gdb-check:$52 = 10
|
|
|
|
// gdb-command:continue
|
|
|
|
|
|
|
|
// gdb-command:print val
|
|
|
|
// gdb-check:$53 = 18
|
2016-10-25 16:32:04 -05:00
|
|
|
// gdbg-command:print 'lexical_scopes_in_block_expression::MUT_INT'
|
|
|
|
// gdbr-command:print lexical_scopes_in_block_expression::MUT_INT
|
2014-04-24 04:35:48 -05:00
|
|
|
// gdb-check:$54 = 8
|
|
|
|
// gdb-command:print ten
|
|
|
|
// gdb-check:$55 = 10
|
|
|
|
// gdb-command:continue
|
|
|
|
|
|
|
|
// gdb-command:print val
|
|
|
|
// gdb-check:$56 = -1
|
|
|
|
// gdb-command:print ten
|
|
|
|
// gdb-check:$57 = 10
|
|
|
|
// gdb-command:continue
|
|
|
|
|
2014-07-09 07:46:09 -05:00
|
|
|
|
|
|
|
// === LLDB TESTS ==================================================================================
|
|
|
|
|
|
|
|
// lldb-command:run
|
|
|
|
|
|
|
|
// STRUCT EXPRESSION
|
|
|
|
// lldb-command:print val
|
2018-10-02 11:13:30 -05:00
|
|
|
// lldbg-check:[...]$0 = -1
|
|
|
|
// lldbr-check:(i32) val = -1
|
2014-07-09 07:46:09 -05:00
|
|
|
// lldb-command:print ten
|
2018-10-02 11:13:30 -05:00
|
|
|
// lldbg-check:[...]$1 = 10
|
|
|
|
// lldbr-check:(isize) ten = 10
|
2014-07-09 07:46:09 -05:00
|
|
|
// lldb-command:continue
|
|
|
|
|
|
|
|
// lldb-command:print val
|
2018-10-02 11:13:30 -05:00
|
|
|
// lldbg-check:[...]$2 = 11
|
|
|
|
// lldbr-check:(isize) val = 11
|
2014-07-09 07:46:09 -05:00
|
|
|
// lldb-command:print ten
|
2018-10-02 11:13:30 -05:00
|
|
|
// lldbg-check:[...]$3 = 10
|
|
|
|
// lldbr-check:(isize) ten = 10
|
2014-07-09 07:46:09 -05:00
|
|
|
// lldb-command:continue
|
|
|
|
|
|
|
|
// lldb-command:print val
|
2018-10-02 11:13:30 -05:00
|
|
|
// lldbg-check:[...]$4 = -1
|
|
|
|
// lldbr-check:(i32) val = -1
|
2014-07-09 07:46:09 -05:00
|
|
|
// lldb-command:print ten
|
2018-10-02 11:13:30 -05:00
|
|
|
// lldbg-check:[...]$5 = 10
|
|
|
|
// lldbr-check:(isize) ten = 10
|
2014-07-09 07:46:09 -05:00
|
|
|
// lldb-command:continue
|
|
|
|
|
|
|
|
// FUNCTION CALL
|
|
|
|
// lldb-command:print val
|
2018-10-02 11:13:30 -05:00
|
|
|
// lldbg-check:[...]$6 = -1
|
|
|
|
// lldbr-check:(i32) val = -1
|
2014-07-09 07:46:09 -05:00
|
|
|
// lldb-command:print ten
|
2018-10-02 11:13:30 -05:00
|
|
|
// lldbg-check:[...]$7 = 10
|
|
|
|
// lldbr-check:(isize) ten = 10
|
2014-07-09 07:46:09 -05:00
|
|
|
// lldb-command:continue
|
|
|
|
|
|
|
|
// lldb-command:print val
|
2018-10-02 11:13:30 -05:00
|
|
|
// lldbg-check:[...]$8 = 12
|
|
|
|
// lldbr-check:(isize) val = 12
|
2014-07-09 07:46:09 -05:00
|
|
|
// lldb-command:print ten
|
2018-10-02 11:13:30 -05:00
|
|
|
// lldbg-check:[...]$9 = 10
|
|
|
|
// lldbr-check:(isize) ten = 10
|
2014-07-09 07:46:09 -05:00
|
|
|
// lldb-command:continue
|
|
|
|
|
|
|
|
// lldb-command:print val
|
2018-10-02 11:13:30 -05:00
|
|
|
// lldbg-check:[...]$10 = -1
|
|
|
|
// lldbr-check:(i32) val = -1
|
2014-07-09 07:46:09 -05:00
|
|
|
// lldb-command:print ten
|
2018-10-02 11:13:30 -05:00
|
|
|
// lldbg-check:[...]$11 = 10
|
|
|
|
// lldbr-check:(isize) ten = 10
|
2014-07-09 07:46:09 -05:00
|
|
|
// lldb-command:continue
|
|
|
|
|
|
|
|
// TUPLE EXPRESSION
|
|
|
|
// lldb-command:print val
|
2018-10-02 11:13:30 -05:00
|
|
|
// lldbg-check:[...]$12 = -1
|
|
|
|
// lldbr-check:(i32) val = -1
|
2014-07-09 07:46:09 -05:00
|
|
|
// lldb-command:print ten
|
2018-10-02 11:13:30 -05:00
|
|
|
// lldbg-check:[...]$13 = 10
|
|
|
|
// lldbr-check:(isize) ten = 10
|
2014-07-09 07:46:09 -05:00
|
|
|
// lldb-command:continue
|
|
|
|
|
|
|
|
// lldb-command:print val
|
2018-10-02 11:13:30 -05:00
|
|
|
// lldbg-check:[...]$14 = 13
|
|
|
|
// lldbr-check:(isize) val = 13
|
2014-07-09 07:46:09 -05:00
|
|
|
// lldb-command:print ten
|
2018-10-02 11:13:30 -05:00
|
|
|
// lldbg-check:[...]$15 = 10
|
|
|
|
// lldbr-check:(isize) ten = 10
|
2014-07-09 07:46:09 -05:00
|
|
|
// lldb-command:continue
|
|
|
|
|
|
|
|
// lldb-command:print val
|
2018-10-02 11:13:30 -05:00
|
|
|
// lldbg-check:[...]$16 = -1
|
|
|
|
// lldbr-check:(i32) val = -1
|
2014-07-09 07:46:09 -05:00
|
|
|
// lldb-command:print ten
|
2018-10-02 11:13:30 -05:00
|
|
|
// lldbg-check:[...]$17 = 10
|
|
|
|
// lldbr-check:(isize) ten = 10
|
2014-07-09 07:46:09 -05:00
|
|
|
// lldb-command:continue
|
|
|
|
|
|
|
|
// VEC EXPRESSION
|
|
|
|
// lldb-command:print val
|
2018-10-02 11:13:30 -05:00
|
|
|
// lldbg-check:[...]$18 = -1
|
|
|
|
// lldbr-check:(i32) val = -1
|
2014-07-09 07:46:09 -05:00
|
|
|
// lldb-command:print ten
|
2018-10-02 11:13:30 -05:00
|
|
|
// lldbg-check:[...]$19 = 10
|
|
|
|
// lldbr-check:(isize) ten = 10
|
2014-07-09 07:46:09 -05:00
|
|
|
// lldb-command:continue
|
|
|
|
|
|
|
|
// lldb-command:print val
|
2018-10-02 11:13:30 -05:00
|
|
|
// lldbg-check:[...]$20 = 14
|
|
|
|
// lldbr-check:(isize) val = 14
|
2014-07-09 07:46:09 -05:00
|
|
|
// lldb-command:print ten
|
2018-10-02 11:13:30 -05:00
|
|
|
// lldbg-check:[...]$21 = 10
|
|
|
|
// lldbr-check:(isize) ten = 10
|
2014-07-09 07:46:09 -05:00
|
|
|
// lldb-command:continue
|
|
|
|
|
|
|
|
// lldb-command:print val
|
2018-10-02 11:13:30 -05:00
|
|
|
// lldbg-check:[...]$22 = -1
|
|
|
|
// lldbr-check:(i32) val = -1
|
2014-07-09 07:46:09 -05:00
|
|
|
// lldb-command:print ten
|
2018-10-02 11:13:30 -05:00
|
|
|
// lldbg-check:[...]$23 = 10
|
|
|
|
// lldbr-check:(isize) ten = 10
|
2014-07-09 07:46:09 -05:00
|
|
|
// lldb-command:continue
|
|
|
|
|
|
|
|
// REPEAT VEC EXPRESSION
|
|
|
|
// lldb-command:print val
|
2018-10-02 11:13:30 -05:00
|
|
|
// lldbg-check:[...]$24 = -1
|
|
|
|
// lldbr-check:(i32) val = -1
|
2014-07-09 07:46:09 -05:00
|
|
|
// lldb-command:print ten
|
2018-10-02 11:13:30 -05:00
|
|
|
// lldbg-check:[...]$25 = 10
|
|
|
|
// lldbr-check:(isize) ten = 10
|
2014-07-09 07:46:09 -05:00
|
|
|
// lldb-command:continue
|
|
|
|
|
|
|
|
// lldb-command:print val
|
2018-10-02 11:13:30 -05:00
|
|
|
// lldbg-check:[...]$26 = 15
|
|
|
|
// lldbr-check:(isize) val = 15
|
2014-07-09 07:46:09 -05:00
|
|
|
// lldb-command:print ten
|
2018-10-02 11:13:30 -05:00
|
|
|
// lldbg-check:[...]$27 = 10
|
|
|
|
// lldbr-check:(isize) ten = 10
|
2014-07-09 07:46:09 -05:00
|
|
|
// lldb-command:continue
|
|
|
|
|
|
|
|
// lldb-command:print val
|
2018-10-02 11:13:30 -05:00
|
|
|
// lldbg-check:[...]$28 = -1
|
|
|
|
// lldbr-check:(i32) val = -1
|
2014-07-09 07:46:09 -05:00
|
|
|
// lldb-command:print ten
|
2018-10-02 11:13:30 -05:00
|
|
|
// lldbg-check:[...]$29 = 10
|
|
|
|
// lldbr-check:(isize) ten = 10
|
2014-07-09 07:46:09 -05:00
|
|
|
// lldb-command:continue
|
|
|
|
|
|
|
|
// ASSIGNMENT EXPRESSION
|
|
|
|
// lldb-command:print val
|
2018-10-02 11:13:30 -05:00
|
|
|
// lldbg-check:[...]$30 = -1
|
|
|
|
// lldbr-check:(i32) val = -1
|
2014-07-09 07:46:09 -05:00
|
|
|
// lldb-command:print ten
|
2018-10-02 11:13:30 -05:00
|
|
|
// lldbg-check:[...]$31 = 10
|
|
|
|
// lldbr-check:(isize) ten = 10
|
2014-07-09 07:46:09 -05:00
|
|
|
// lldb-command:continue
|
|
|
|
|
|
|
|
// lldb-command:print val
|
2018-10-02 11:13:30 -05:00
|
|
|
// lldbg-check:[...]$32 = 16
|
|
|
|
// lldbr-check:(isize) val = 16
|
2014-07-09 07:46:09 -05:00
|
|
|
// lldb-command:print ten
|
2018-10-02 11:13:30 -05:00
|
|
|
// lldbg-check:[...]$33 = 10
|
|
|
|
// lldbr-check:(isize) ten = 10
|
2014-07-09 07:46:09 -05:00
|
|
|
// lldb-command:continue
|
|
|
|
|
|
|
|
// lldb-command:print val
|
2018-10-02 11:13:30 -05:00
|
|
|
// lldbg-check:[...]$34 = -1
|
|
|
|
// lldbr-check:(i32) val = -1
|
2014-07-09 07:46:09 -05:00
|
|
|
// lldb-command:print ten
|
2018-10-02 11:13:30 -05:00
|
|
|
// lldbg-check:[...]$35 = 10
|
|
|
|
// lldbr-check:(isize) ten = 10
|
2014-07-09 07:46:09 -05:00
|
|
|
// lldb-command:continue
|
|
|
|
|
|
|
|
|
|
|
|
// ARITHMETIC EXPRESSION
|
|
|
|
// lldb-command:print val
|
2018-10-02 11:13:30 -05:00
|
|
|
// lldbg-check:[...]$36 = -1
|
|
|
|
// lldbr-check:(i32) val = -1
|
2014-07-09 07:46:09 -05:00
|
|
|
// lldb-command:print ten
|
2018-10-02 11:13:30 -05:00
|
|
|
// lldbg-check:[...]$37 = 10
|
|
|
|
// lldbr-check:(isize) ten = 10
|
2014-07-09 07:46:09 -05:00
|
|
|
// lldb-command:continue
|
|
|
|
|
|
|
|
// lldb-command:print val
|
2018-10-02 11:13:30 -05:00
|
|
|
// lldbg-check:[...]$38 = 17
|
|
|
|
// lldbr-check:(isize) val = 17
|
2014-07-09 07:46:09 -05:00
|
|
|
// lldb-command:print ten
|
2018-10-02 11:13:30 -05:00
|
|
|
// lldbg-check:[...]$39 = 10
|
|
|
|
// lldbr-check:(isize) ten = 10
|
2014-07-09 07:46:09 -05:00
|
|
|
// lldb-command:continue
|
|
|
|
|
|
|
|
// lldb-command:print val
|
2018-10-02 11:13:30 -05:00
|
|
|
// lldbg-check:[...]$40 = -1
|
|
|
|
// lldbr-check:(i32) val = -1
|
2014-07-09 07:46:09 -05:00
|
|
|
// lldb-command:print ten
|
2018-10-02 11:13:30 -05:00
|
|
|
// lldbg-check:[...]$41 = 10
|
|
|
|
// lldbr-check:(isize) ten = 10
|
2014-07-09 07:46:09 -05:00
|
|
|
// lldb-command:continue
|
|
|
|
|
|
|
|
// INDEX EXPRESSION
|
|
|
|
// lldb-command:print val
|
2018-10-02 11:13:30 -05:00
|
|
|
// lldbg-check:[...]$42 = -1
|
|
|
|
// lldbr-check:(i32) val = -1
|
2014-07-09 07:46:09 -05:00
|
|
|
// lldb-command:print ten
|
2018-10-02 11:13:30 -05:00
|
|
|
// lldbg-check:[...]$43 = 10
|
|
|
|
// lldbr-check:(isize) ten = 10
|
2014-07-09 07:46:09 -05:00
|
|
|
// lldb-command:continue
|
|
|
|
|
|
|
|
// lldb-command:print val
|
2018-10-02 11:13:30 -05:00
|
|
|
// lldbg-check:[...]$44 = 18
|
|
|
|
// lldbr-check:(isize) val = 18
|
2014-07-09 07:46:09 -05:00
|
|
|
// lldb-command:print ten
|
2018-10-02 11:13:30 -05:00
|
|
|
// lldbg-check:[...]$45 = 10
|
|
|
|
// lldbr-check:(isize) ten = 10
|
2014-07-09 07:46:09 -05:00
|
|
|
// lldb-command:continue
|
|
|
|
|
|
|
|
// lldb-command:print val
|
2018-10-02 11:13:30 -05:00
|
|
|
// lldbg-check:[...]$46 = -1
|
|
|
|
// lldbr-check:(i32) val = -1
|
2014-07-09 07:46:09 -05:00
|
|
|
// lldb-command:print ten
|
2018-10-02 11:13:30 -05:00
|
|
|
// lldbg-check:[...]$47 = 10
|
|
|
|
// lldbr-check:(isize) ten = 10
|
2014-07-09 07:46:09 -05:00
|
|
|
// lldb-command:continue
|
|
|
|
|
2014-10-27 17:37:07 -05:00
|
|
|
#![allow(unused_variables)]
|
|
|
|
#![allow(unused_assignments)]
|
2015-09-19 15:33:47 -05:00
|
|
|
#![feature(omit_gdb_pretty_printer_section)]
|
2014-12-03 16:48:18 -06:00
|
|
|
#![omit_gdb_pretty_printer_section]
|
2014-04-24 04:35:48 -05:00
|
|
|
|
2015-03-25 19:06:52 -05:00
|
|
|
static mut MUT_INT: isize = 0;
|
2014-04-24 04:35:48 -05:00
|
|
|
|
|
|
|
struct Point {
|
2015-03-25 19:06:52 -05:00
|
|
|
x: isize,
|
|
|
|
y: isize
|
2014-04-24 04:35:48 -05:00
|
|
|
}
|
|
|
|
|
2015-03-25 19:06:52 -05:00
|
|
|
fn a_function(x: isize) -> isize {
|
2014-04-24 04:35:48 -05:00
|
|
|
x + 1
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
|
2015-01-25 15:05:03 -06:00
|
|
|
let val = -1;
|
|
|
|
let ten = 10;
|
2014-04-24 04:35:48 -05:00
|
|
|
|
|
|
|
// surrounded by struct expression
|
|
|
|
let point = Point {
|
|
|
|
x: {
|
2014-07-09 07:46:09 -05:00
|
|
|
zzz(); // #break
|
2014-04-24 04:35:48 -05:00
|
|
|
sentinel();
|
|
|
|
|
|
|
|
let val = ten + 1;
|
|
|
|
unsafe {MUT_INT = 1;};
|
|
|
|
|
2014-07-09 07:46:09 -05:00
|
|
|
zzz(); // #break
|
2014-04-24 04:35:48 -05:00
|
|
|
sentinel();
|
|
|
|
|
|
|
|
val
|
|
|
|
},
|
|
|
|
y: 10
|
|
|
|
};
|
|
|
|
|
2014-07-09 07:46:09 -05:00
|
|
|
zzz(); // #break
|
2014-04-24 04:35:48 -05:00
|
|
|
sentinel();
|
|
|
|
|
|
|
|
// surrounded by function call
|
|
|
|
let _ = a_function({
|
2014-07-09 07:46:09 -05:00
|
|
|
zzz(); // #break
|
2014-04-24 04:35:48 -05:00
|
|
|
sentinel();
|
|
|
|
|
|
|
|
let val = ten + 2;
|
|
|
|
unsafe {MUT_INT = 2;};
|
|
|
|
|
2014-07-09 07:46:09 -05:00
|
|
|
zzz(); // #break
|
2014-04-24 04:35:48 -05:00
|
|
|
sentinel();
|
|
|
|
|
|
|
|
val
|
|
|
|
});
|
|
|
|
|
2014-07-09 07:46:09 -05:00
|
|
|
zzz(); // #break
|
2014-04-24 04:35:48 -05:00
|
|
|
sentinel();
|
|
|
|
|
|
|
|
|
|
|
|
// surrounded by tup
|
|
|
|
let _ = ({
|
2014-07-09 07:46:09 -05:00
|
|
|
zzz(); // #break
|
2014-04-24 04:35:48 -05:00
|
|
|
sentinel();
|
|
|
|
|
|
|
|
let val = ten + 3;
|
|
|
|
unsafe {MUT_INT = 3;};
|
|
|
|
|
2014-07-09 07:46:09 -05:00
|
|
|
zzz(); // #break
|
2014-04-24 04:35:48 -05:00
|
|
|
sentinel();
|
|
|
|
|
|
|
|
val
|
2015-01-25 15:05:03 -06:00
|
|
|
}, 0);
|
2014-04-24 04:35:48 -05:00
|
|
|
|
2014-07-09 07:46:09 -05:00
|
|
|
zzz(); // #break
|
2014-04-24 04:35:48 -05:00
|
|
|
sentinel();
|
|
|
|
|
|
|
|
// surrounded by vec
|
|
|
|
let _ = [{
|
2014-07-09 07:46:09 -05:00
|
|
|
zzz(); // #break
|
2014-04-24 04:35:48 -05:00
|
|
|
sentinel();
|
|
|
|
|
|
|
|
let val = ten + 4;
|
|
|
|
unsafe {MUT_INT = 4;};
|
|
|
|
|
2014-07-09 07:46:09 -05:00
|
|
|
zzz(); // #break
|
2014-04-24 04:35:48 -05:00
|
|
|
sentinel();
|
|
|
|
|
|
|
|
val
|
|
|
|
}, 0, 0];
|
|
|
|
|
2014-07-09 07:46:09 -05:00
|
|
|
zzz(); // #break
|
2014-04-24 04:35:48 -05:00
|
|
|
sentinel();
|
|
|
|
|
|
|
|
// surrounded by repeat vec
|
|
|
|
let _ = [{
|
2014-07-09 07:46:09 -05:00
|
|
|
zzz(); // #break
|
2014-04-24 04:35:48 -05:00
|
|
|
sentinel();
|
|
|
|
|
|
|
|
let val = ten + 5;
|
|
|
|
unsafe {MUT_INT = 5;};
|
|
|
|
|
2014-07-09 07:46:09 -05:00
|
|
|
zzz(); // #break
|
2014-04-24 04:35:48 -05:00
|
|
|
sentinel();
|
|
|
|
|
|
|
|
val
|
2014-12-19 20:20:51 -06:00
|
|
|
}; 10];
|
2014-04-24 04:35:48 -05:00
|
|
|
|
2014-07-09 07:46:09 -05:00
|
|
|
zzz(); // #break
|
2014-04-24 04:35:48 -05:00
|
|
|
sentinel();
|
|
|
|
|
|
|
|
// assignment expression
|
|
|
|
let mut var = 0;
|
|
|
|
var = {
|
2014-07-09 07:46:09 -05:00
|
|
|
zzz(); // #break
|
2014-04-24 04:35:48 -05:00
|
|
|
sentinel();
|
|
|
|
|
|
|
|
let val = ten + 6;
|
|
|
|
unsafe {MUT_INT = 6;};
|
|
|
|
|
2014-07-09 07:46:09 -05:00
|
|
|
zzz(); // #break
|
2014-04-24 04:35:48 -05:00
|
|
|
sentinel();
|
|
|
|
|
|
|
|
val
|
|
|
|
};
|
|
|
|
|
2014-07-09 07:46:09 -05:00
|
|
|
zzz(); // #break
|
2014-04-24 04:35:48 -05:00
|
|
|
sentinel();
|
|
|
|
|
|
|
|
// arithmetic expression
|
|
|
|
var = 10 + -{
|
2014-07-09 07:46:09 -05:00
|
|
|
zzz(); // #break
|
2014-04-24 04:35:48 -05:00
|
|
|
sentinel();
|
|
|
|
|
|
|
|
let val = ten + 7;
|
|
|
|
unsafe {MUT_INT = 7;};
|
|
|
|
|
2014-07-09 07:46:09 -05:00
|
|
|
zzz(); // #break
|
2014-04-24 04:35:48 -05:00
|
|
|
sentinel();
|
|
|
|
|
|
|
|
val
|
|
|
|
} * 5;
|
|
|
|
|
2014-07-09 07:46:09 -05:00
|
|
|
zzz(); // #break
|
2014-04-24 04:35:48 -05:00
|
|
|
sentinel();
|
|
|
|
|
|
|
|
// index expression
|
2015-01-25 15:05:03 -06:00
|
|
|
let a_vector = [10; 20];
|
2014-04-24 04:35:48 -05:00
|
|
|
let _ = a_vector[{
|
2014-07-09 07:46:09 -05:00
|
|
|
zzz(); // #break
|
2014-04-24 04:35:48 -05:00
|
|
|
sentinel();
|
|
|
|
|
|
|
|
let val = ten + 8;
|
|
|
|
unsafe {MUT_INT = 8;};
|
|
|
|
|
2014-07-09 07:46:09 -05:00
|
|
|
zzz(); // #break
|
2014-04-24 04:35:48 -05:00
|
|
|
sentinel();
|
|
|
|
|
2015-03-25 19:06:52 -05:00
|
|
|
val as usize
|
2014-04-24 04:35:48 -05:00
|
|
|
}];
|
|
|
|
|
2014-07-09 07:46:09 -05:00
|
|
|
zzz(); // #break
|
2014-04-24 04:35:48 -05:00
|
|
|
sentinel();
|
|
|
|
}
|
|
|
|
|
|
|
|
fn zzz() {()}
|
|
|
|
fn sentinel() {()}
|