aboutsummaryrefslogtreecommitdiff
path: root/gcc/dse.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/dse.c')
-rw-r--r--gcc/dse.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/dse.c b/gcc/dse.c
index 7bf759d45fc..5ac3fee7dff 100644
--- a/gcc/dse.c
+++ b/gcc/dse.c
@@ -1931,6 +1931,12 @@ scan_insn (bb_info_t bb_info, rtx insn)
bb_info->last_insn = insn_info;
+ if (DEBUG_INSN_P (insn))
+ {
+ insn_info->cannot_delete = true;
+ return;
+ }
+
/* Cselib clears the table for this case, so we have to essentially
do the same. */
if (NONJUMP_INSN_P (insn)