https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88635
--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Author: jakub Date: Thu Feb 7 14:25:01 2019 New Revision: 268617 URL: https://gcc.gnu.org/viewcvs?rev=268617&root=gcc&view=rev Log: Backported from mainline 2019-01-07 Jakub Jelinek <ja...@redhat.com> PR debug/88723 * dwarf2out.c (const_ok_for_output_1): Remove redundant call to const_not_ok_for_debug_p target hook. (mem_loc_descriptor) <case UNSPEC>: Only call const_ok_for_output_1 on UNSPEC and subexpressions thereof if all subexpressions of the UNSPEC are CONSTANT_P. 2019-01-05 Jakub Jelinek <ja...@redhat.com> PR debug/88635 * dwarf2out.c (const_ok_for_output_1): Reject MINUS that contains SYMBOL_REF, CODE_LABEL or UNSPEC in subexpressions of second argument. Reject PLUS that contains SYMBOL_REF, CODE_LABEL or UNSPEC in subexpressions of both operands. (mem_loc_descriptor): Handle UNSPEC if target hook acks it and all the subrtxes are CONSTANT_P. * gcc.dg/debug/dwarf2/pr88635.c: New test. Added: branches/gcc-8-branch/gcc/testsuite/gcc.dg/debug/dwarf2/pr88635.c Modified: branches/gcc-8-branch/gcc/ChangeLog branches/gcc-8-branch/gcc/dwarf2out.c branches/gcc-8-branch/gcc/testsuite/ChangeLog