[gdb/testsuite] Add testcase for DW_AT_count referencing a variable
authorGary Benson <gbenson@redhat.com>
Sun, 22 Nov 2020 09:54:58 +0000 (10:54 +0100)
committerTom de Vries <tdevries@suse.de>
Sun, 22 Nov 2020 09:54:58 +0000 (10:54 +0100)
commit117c628d49309e3b6a8b11d492f497104f3e4b2c
tree4194be44158a6297599ed05d2350b87e70ac6ad8
parent60b43650988db65e5d4ffc6053d6e37444e3752e
[gdb/testsuite] Add testcase for DW_AT_count referencing a variable

Clang describes the upper bounds of variable length arrays using
a DW_AT_count attribute which references the DIE of a synthetic
variable whose value is specified using a DW_AT_location.  GDB handles
these incorrectly if the corresponding DWARF expression finishes with a
DW_OP_stack_value (PR26905).  This commit adds a new kfailed test to
gdb.dwarf2/count.exp with the same DWARF as that generated by Clang for
gdb.base/vla-optimized-out.exp, one of the failing tests.

Checked on Fedora 32 x86_64, with GCC and Clang.

gdb/testsuite/ChangeLog:

2020-11-22  Gary Benson <gbenson@redhat.com>

PR gdb/26905
* gdb.dwarf2/count.exp: Add test for an array whose upper bound
is defined using a DW_AT_count which references another DIE.
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.dwarf2/count.exp
This page took 0.025523 seconds and 4 git commands to generate.