re PR debug/82837 (ICE in output_operand: invalid expression as operand)
authorJakub Jelinek <jakub@redhat.com>
Thu, 9 Nov 2017 08:54:19 +0000 (09:54 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Thu, 9 Nov 2017 08:54:19 +0000 (09:54 +0100)
commit6bc322a11bec51aceb463fb2336198645dca993f
tree8ca86eec5904dd459014b877b1bc6b7d7aa43bd9
parente7c77c4f12100602e078cee454b8d0e7433c2660
re PR debug/82837 (ICE in output_operand: invalid expression as operand)

PR debug/82837
* dwarf2out.c (const_ok_for_output_1): Reject NEG in addition to NOT.
(mem_loc_descriptor): Handle (const (neg (...))) as (neg (const (...)))
and similarly for not instead of neg.

* gcc.dg/debug/dwarf2/pr82837.c: New test.

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