aboutsummaryrefslogtreecommitdiff
path: root/gcc/dwarf2out.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2019-01-07 10:51:46 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2019-01-07 10:51:46 +0100
commit1e92df7eed596c8604e7653ee828d881b5d965a4 (patch)
tree4297ec7f51d59e568ccf6caf45cc5e259af7e3b6 /gcc/dwarf2out.c
parent0119d5a23abf2f45f5ec336589d4adad9dfc5c7f (diff)
downloadgcc-1e92df7eed596c8604e7653ee828d881b5d965a4.zip
gcc-1e92df7eed596c8604e7653ee828d881b5d965a4.tar.gz
gcc-1e92df7eed596c8604e7653ee828d881b5d965a4.tar.bz2
re PR debug/88723 (PR debug/88635 patch breaks testsuite_shared.cc compilation)
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. From-SVN: r267638
Diffstat (limited to 'gcc/dwarf2out.c')
-rw-r--r--gcc/dwarf2out.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index 0d643dd..8b4f7bc 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -14445,13 +14445,6 @@ const_ok_for_output_1 (rtx rtl)
if (CONST_POLY_INT_P (rtl))
return false;
- if (targetm.const_not_ok_for_debug_p (rtl))
- {
- expansion_failed (NULL_TREE, rtl,
- "Expression rejected for debug by the backend.\n");
- return false;
- }
-
/* FIXME: Refer to PR60655. It is possible for simplification
of rtl expressions in var tracking to produce such expressions.
We should really identify / validate expressions
@@ -15660,8 +15653,17 @@ mem_loc_descriptor (rtx rtl, machine_mode mode,
bool not_ok = false;
subrtx_var_iterator::array_type array;
FOR_EACH_SUBRTX_VAR (iter, array, rtl, ALL)
- if ((*iter != rtl && !CONSTANT_P (*iter))
- || !const_ok_for_output_1 (*iter))
+ if (*iter != rtl && !CONSTANT_P (*iter))
+ {
+ not_ok = true;
+ break;
+ }
+
+ if (not_ok)
+ break;
+
+ FOR_EACH_SUBRTX_VAR (iter, array, rtl, ALL)
+ if (!const_ok_for_output_1 (*iter))
{
not_ok = true;
break;