aboutsummaryrefslogtreecommitdiff
path: root/ld/ldgram.y
diff options
context:
space:
mode:
authorTom de Vries <tdevries@suse.de>2021-07-21 14:19:51 +0200
committerTom de Vries <tdevries@suse.de>2021-07-21 14:19:51 +0200
commit8f5d31b8d1f80fd9fff4cef4acc4491a0d83fbed (patch)
tree2a1753443ecec5d67967192782ee031389a6cfff /ld/ldgram.y
parent0057a7ee0d963eb9aee5cdfb9d6da5279bc8caf9 (diff)
downloadgdb-8f5d31b8d1f80fd9fff4cef4acc4491a0d83fbed.zip
gdb-8f5d31b8d1f80fd9fff4cef4acc4491a0d83fbed.tar.gz
gdb-8f5d31b8d1f80fd9fff4cef4acc4491a0d83fbed.tar.bz2
[gdb/testsuite] Fix FAILs due to PR gcc/101452
When running test-case gdb.base/ptype-offsets.exp with gcc-11 (with -gdwarf-5 default) or gcc-10 with target board unix/gdb:debug_flags=-gdwarf-5 we run into this regression: ... (gdb) ptype/o static_member^M /* offset | size */ type = struct static_member {^M - static static_member Empty;^M /* 0 | 4 */ int abc;^M ^M /* total size (bytes): 4 */^M }^M -(gdb) PASS: gdb.base/ptype-offsets.exp: ptype/o static_member +(gdb) FAIL: gdb.base/ptype-offsets.exp: ptype/o static_member ... This is caused by missing debug info, which I filed as gcc PR101452 - "[debug, dwarf-5] undefined static member removed by -feliminate-unused-debug-symbols". It's not clear yet whether this is a bug or a feature, but work around this in the test-cases by: - defining the static member - adding additional_flags=-fno-eliminate-unused-debug-types. Tested on x86_64-linux. gdb/testsuite/ChangeLog: 2021-07-20 Tom de Vries <tdevries@suse.de> * lib/gdb.exp (gcc_major_version): New proc. * gdb.base/ptype-offsets.cc: Define static member static_member::Empty. * gdb.cp/templates.exp: Define static member using -DGCC_BUG. * gdb.cp/m-static.exp: Add additional_flags=-fno-eliminate-unused-debug-types. * gdb.cp/pr-574.exp: Same. * gdb.cp/pr9167.exp: Same.
Diffstat (limited to 'ld/ldgram.y')
0 files changed, 0 insertions, 0 deletions