[debug] DWARF: add DW_AT_count to zero-length arrays
authorOmar Sandoval <osandov@osandov.com>
Thu, 13 Sep 2018 10:27:12 +0000 (10:27 +0000)
committerTom de Vries <vries@gcc.gnu.org>
Thu, 13 Sep 2018 10:27:12 +0000 (10:27 +0000)
commit67295b68372f0dd13d44556e2f48a370c5d75119
treee3c1d2f4989f85b7e96c34cf47cd13023c9f6fa6
parent231c52ae41a335649013f9fbfabca337d1ea98fa
[debug] DWARF: add DW_AT_count to zero-length arrays

2018-09-13  Omar Sandoval  <osandov@osandov.com>
    Tom de Vries  <tdevries@suse.de>

PR debug/86985
* dwarf2out.c (is_c): New function.
(add_subscript_info): Add DW_AT_count of 0 for C zero-length arrays.

* gcc.dg/guality/zero-length-array.c: New test.

Co-Authored-By: Tom de Vries <tdevries@suse.de>
From-SVN: r264267
gcc/ChangeLog
gcc/dwarf2out.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/guality/zero-length-array.c [new file with mode: 0644]