aboutsummaryrefslogtreecommitdiff
path: root/gcc/dwarf2out.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@cygnus.com>1999-03-21 12:14:09 +0000
committerNick Clifton <nickc@gcc.gnu.org>1999-03-21 12:14:09 +0000
commit088e716060315042f749c74ad3cfd43b97e614bd (patch)
tree2d8c103ec5d59d7f6360e078e727209d3e9c0646 /gcc/dwarf2out.c
parent0fdb7c85cee6d9bad7a987444464f80ad0777aa4 (diff)
downloadgcc-088e716060315042f749c74ad3cfd43b97e614bd.zip
gcc-088e716060315042f749c74ad3cfd43b97e614bd.tar.gz
gcc-088e716060315042f749c74ad3cfd43b97e614bd.tar.bz2
Preserve programmer specified labels, and emit debug info for them even if
they are deleted. From-SVN: r25883
Diffstat (limited to 'gcc/dwarf2out.c')
-rw-r--r--gcc/dwarf2out.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index 5ee5535..ae38b20 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -8583,7 +8583,13 @@ gen_label_die (decl, context_die)
else
{
insn = DECL_RTL (decl);
- if (GET_CODE (insn) == CODE_LABEL)
+
+ /* Deleted labels are programmer specified labels which have been
+ eliminated because of various optimisations. We still emit them
+ here so that it is possible to put breakpoints on them. */
+ if (GET_CODE (insn) == CODE_LABEL
+ || ((GET_CODE (insn) == NOTE
+ && NOTE_LINE_NUMBER (insn) == NOTE_INSN_DELETED_LABEL)))
{
/* When optimization is enabled (via -O) some parts of the compiler
(e.g. jump.c and cse.c) may try to delete CODE_LABEL insns which