re PR debug/78587 (dwarf2out.c:1517:45: runtime error: negation of -92233720368547758...
authorJakub Jelinek <jakub@redhat.com>
Thu, 1 Dec 2016 09:24:55 +0000 (10:24 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Thu, 1 Dec 2016 09:24:55 +0000 (10:24 +0100)
commitd26b3eb7658b48e6dadec752755f864652f19591
treef3854e70ac4403b06fc4365497d9de9c5d72f937
parent43d0b501eec49d6d4092fe0e5299aedf1d743124
re PR debug/78587 (dwarf2out.c:1517:45: runtime error: negation of -9223372036854775808 cannot be represented in type 'long int [4]'; cast to an unsigned type to negate this value to itself)

PR debug/78587
* dwarf2out.c (loc_descr_plus_const): For negative offset use
uint_loc_descriptor instead of int_loc_descriptor and perform negation
in unsigned HOST_WIDE_INT type.
(scompare_loc_descriptor): Shift UINTVAL left instead of INTVAL.

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

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