aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/ChangeLog
diff options
context:
space:
mode:
authorTom de Vries <tdevries@suse.de>2019-09-12 22:36:37 +0200
committerTom de Vries <tdevries@suse.de>2019-09-12 22:36:37 +0200
commit25e5c20918a0ec69e37c1987db52062b0eab7194 (patch)
tree2b34e6da51acf3e8c39b0a029a947b76aeadbe58 /gdb/testsuite/ChangeLog
parent4993045d18d69ecee41ca341cde6bbed220dc8a4 (diff)
downloadgdb-25e5c20918a0ec69e37c1987db52062b0eab7194.zip
gdb-25e5c20918a0ec69e37c1987db52062b0eab7194.tar.gz
gdb-25e5c20918a0ec69e37c1987db52062b0eab7194.tar.bz2
[gdb/testsuite] Allow some tests in gdb.base/store.exp to be unsupported
The test-case gdb.base/store.exp fails with gcc 7.4.0: ... nr of unexpected failures 27 ... The first FAIL: ... 110 l = add_float (l, r); (gdb) PASS: gdb.base/store.exp: continue to wack_float print l $21 = <optimized out> FAIL: gdb.base/store.exp: var float l; print old l, expecting -1 ... relates to this bit in the test-case (compiled at -O0): ... 106 float 107 wack_float (register float u, register float v) 108 { 109 register float l = u, r = v; 110 l = add_float (l, r); 111 return l + r; 112 } ... and it expects to be able to read and modify variable l before executing line 110, but it already fails to read the value, because l has no DW_AT_location attribute in the debug info. Variable l is declared with the register keyword, and GCC implements the register keyword at -O0 like so: ... the compiler allocates distinct stack memory for all variables that do not have the register storage-class specifier; if register is specified, the variable may have a shorter lifespan than the code would indicate and may never be placed in memory. ... The fact that l has no DW_AT_location attribute, matches with the documented "variable may have a shorter lifespan that code would indicate", (though it is the most extreme case of it) so the gcc behaviour is valid. We can of course improve gcc to generate better debuginfo (filed gcc PR91611), but this not a wrong-debug problem. [ The test-case passes with gcc 4.2.1, but for the failing test discussed above, it passes simply because it doesn't store l in a register. ] With the debug info missing for l, reading and setting l is unsupported, so fix the FAIL by marking the test UNSUPPORTED instead. Tested on x86_64-linux. gdb/testsuite/ChangeLog: 2019-09-12 Tom de Vries <tdevries@suse.de> * gdb.base/store.exp: Allow register variables to be optimized out at -O0.
Diffstat (limited to 'gdb/testsuite/ChangeLog')
-rw-r--r--gdb/testsuite/ChangeLog5
1 files changed, 5 insertions, 0 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index bf3fcc7..7352e9f 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2019-09-12 Tom de Vries <tdevries@suse.de>
+
+ * gdb.base/store.exp: Allow register variables to be optimized out at
+ -O0.
+
2019-09-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
* gdb.ada/rdv_wait.exp: Update to new task names.