diff options
author | Tom Tromey <tromey@adacore.com> | 2022-12-06 07:41:52 -0700 |
---|---|---|
committer | Tom Tromey <tromey@adacore.com> | 2022-12-06 07:41:52 -0700 |
commit | e03698c1227bc18835cc2e4a9146a8369635e119 (patch) | |
tree | ee736b40573cf42d8379f677776ca385af74f553 /gdb/testsuite | |
parent | 83f18e5ebe627163f744215d3760a8eaacee6ec1 (diff) | |
download | binutils-gdb-e03698c1227bc18835cc2e4a9146a8369635e119.tar.gz |
Fix operator precedence bug in Rust parser
PR rust/29859 points out an operator precedence bug in the Rust
parser. This patch fixes it and adds a regression test.
Diffstat (limited to 'gdb/testsuite')
-rw-r--r-- | gdb/testsuite/gdb.rust/simple.exp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.rust/simple.exp b/gdb/testsuite/gdb.rust/simple.exp index 252c47baac5..3a010f30ea6 100644 --- a/gdb/testsuite/gdb.rust/simple.exp +++ b/gdb/testsuite/gdb.rust/simple.exp @@ -412,3 +412,7 @@ if {[lindex $v 0] >= 8} { gdb_test "python print(gdb.lookup_type('simple::MoreComplicated').dynamic)" \ "True" } + +# The new parser introduced an operator precedence bug. +gdb_test "print 5 * 7 / 5" " = 7" +gdb_test "print 4 - 3 - 1" " = 0" |