Fix gdb.rust/simple.rs for more recent compilers
authorTom Tromey <tom@tromey.com>
Mon, 19 Nov 2018 17:52:32 +0000 (10:52 -0700)
committerTom Tromey <tom@tromey.com>
Mon, 19 Nov 2018 18:07:07 +0000 (11:07 -0700)
gdb.rust/simple.exp will fail when run with a recent version of rustc.
This patch fixes the test case so that it will continue to run.

Tested on x86-64 Fedora 28.

I also temporarily backed out the rust-lang.c from
commit 098b2108a2b61531c0bc8ea16854f773083a95d7, and verified that
this updated test still would have provoked the original bug.

gdb/testsuite/ChangeLog
2018-11-19  Tom Tromey  <tom@tromey.com>

* gdb.rust/simple.rs: Don't initialize empty_enum_value.

gdb/testsuite/ChangeLog
gdb/testsuite/gdb.rust/simple.rs

index 9acaa79e2b2278a4125856399147af72a50fabfa..e7693a07f546ab57ed09b86044b2658a0dc4d581 100644 (file)
@@ -1,3 +1,7 @@
+2018-11-19  Tom Tromey  <tom@tromey.com>
+
+       * gdb.rust/simple.rs: Don't initialize empty_enum_value.
+
 2018-11-19  Pedro Alves  <palves@redhat.com>
 
        * gdb.base/warning.exp: Don't override INTERNAL_FLAGS.  Use
index 00a25e0828dd8cc204a97e062ea081e5b265daeb..79d463c1989c03da20883cf54e80776dcdeb9cc6 100644 (file)
@@ -170,7 +170,7 @@ fn main () {
     let u = Union { f2: 255 };
     let simplelayout = SimpleLayout { f1: 8, f2: 9 };
 
-    let empty_enum_value: EmptyEnum = unsafe { ::std::mem::zeroed() };
+    let empty_enum_value: EmptyEnum;
 
     println!("{}, {}", x.0, x.1);        // set breakpoint here
     println!("{}", diff2(92, 45));
This page took 0.033772 seconds and 4 git commands to generate.