re PR debug/85252 (ICE with -g for static zero-length array initialization)
authorJakub Jelinek <jakub@redhat.com>
Fri, 6 Apr 2018 17:28:54 +0000 (19:28 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Fri, 6 Apr 2018 17:28:54 +0000 (19:28 +0200)
commitc617fb562d510101b5445464753858a557020acb
treeca7aea9f6caf538d42053af6fca7c822bc66bc11
parent49574486e65c03100fbf2993804ccc6dbb9051e6
re PR debug/85252 (ICE with -g for static zero-length array initialization)

PR debug/85252
* dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.

* gcc.dg/debug/pr85252.c: New test.

From-SVN: r259183
gcc/ChangeLog
gcc/dwarf2out.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/debug/pr85252.c [new file with mode: 0644]