aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2016-05-18 17:22:30 -0600
committerTom Tromey <tom@tromey.com>2016-06-10 09:57:09 -0600
commit347dc1025db1c0acf616ab6520c3f36448f25e8b (patch)
treeab361773f82b20a3171e5fb7fc05266f11b1c90a /gdb/testsuite
parentedef7b8cf3d811ce8630591dbed1257ba16164ff (diff)
downloadgdb-347dc1025db1c0acf616ab6520c3f36448f25e8b.zip
gdb-347dc1025db1c0acf616ab6520c3f36448f25e8b.tar.gz
gdb-347dc1025db1c0acf616ab6520c3f36448f25e8b.tar.bz2
Fix PR rust/20110
PR rust/20110 concerns the type of an integer constant that is too large for "i32", the default integer type. This patch changes the type of such a constant to i64. This is important because such values are often addresses, so truncating them by default is unfriendly. Built and regtested on x86-64 Fedora 23. 2016-06-10 Tom Tromey <tom@tromey.com> PR rust/20110: * rust-exp.y (lex_number): Don't truncate large numbers to i32. 2016-06-10 Tom Tromey <tom@tromey.com> PR rust/20110: * gdb.rust/expr.exp: Add test for integer constant larger than i32.
Diffstat (limited to 'gdb/testsuite')
-rw-r--r--gdb/testsuite/ChangeLog6
-rw-r--r--gdb/testsuite/gdb.rust/expr.exp2
2 files changed, 8 insertions, 0 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index eda7b99..7d2b144 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,9 @@
+2016-06-10 Tom Tromey <tom@tromey.com>
+
+ PR rust/20110:
+ * gdb.rust/expr.exp: Add test for integer constant larger than
+ i32.
+
2016-06-10 Bernhard Heckel <bernhard.heckel@intel.com>
* gdb.fortran/nested-funcs.exp: New.
diff --git a/gdb/testsuite/gdb.rust/expr.exp b/gdb/testsuite/gdb.rust/expr.exp
index 99a697e..fff3eef 100644
--- a/gdb/testsuite/gdb.rust/expr.exp
+++ b/gdb/testsuite/gdb.rust/expr.exp
@@ -104,6 +104,8 @@ gdb_test "print 1 << 5" " = 32"
gdb_test "print 32usize >> 5" " = 1"
gdb_test "ptype 32i32 as f64" "type = f64"
+gdb_test "ptype 0xf9f9f9f90000" "type = i64"
+
gdb_test "print ()" " = \\(\\)"
gdb_test "print \[1,2,3,4\]" " = \\\[1, 2, 3, 4\\\]"