aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2022-12-12 06:36:55 -0700
committerTom Tromey <tom@tromey.com>2022-12-12 06:42:17 -0700
commit67a8c89601f6e1947484d5de23411634fef92e68 (patch)
tree629c90f59a49113b751bf56fd94ea9557bc73273 /gdb/testsuite
parent167f3beb655da160e9241e76b7f8b1855b30c903 (diff)
downloadbinutils-67a8c89601f6e1947484d5de23411634fef92e68.zip
binutils-67a8c89601f6e1947484d5de23411634fef92e68.tar.gz
binutils-67a8c89601f6e1947484d5de23411634fef92e68.tar.bz2
Another Rust operator precedence bug
My earlier patch to fix PR rust/29859 introduced a new operator precedence bug in the Rust parser. Assignment operators are right-associative in Rust. And, while this doesn't often matter, as Rust assignments always have the value (), still as a matter of principle we should get this correct. Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29859
Diffstat (limited to 'gdb/testsuite')
-rw-r--r--gdb/testsuite/gdb.rust/simple.exp3
1 files changed, 3 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.rust/simple.exp b/gdb/testsuite/gdb.rust/simple.exp
index 3a010f3..0fb06af 100644
--- a/gdb/testsuite/gdb.rust/simple.exp
+++ b/gdb/testsuite/gdb.rust/simple.exp
@@ -416,3 +416,6 @@ if {[lindex $v 0] >= 8} {
# The new parser introduced an operator precedence bug.
gdb_test "print 5 * 7 / 5" " = 7"
gdb_test "print 4 - 3 - 1" " = 0"
+
+# Another operator precedence bug.
+gdb_test "print \$one = \$two = 75" " = \\\(\\\)"