aboutsummaryrefslogtreecommitdiff
path: root/gcc/function.c
diff options
context:
space:
mode:
authorDoug Evans <dje@gnu.org>1997-03-28 22:36:31 +0000
committerDoug Evans <dje@gnu.org>1997-03-28 22:36:31 +0000
commit82e415a358f4c91851c7a0c194b159bd82edf116 (patch)
treeb43eda6c0cc7142a1641dd5cf813425e9a50996a /gcc/function.c
parenta7dbb8b4398c52f476c14b02fb7dc5361ce2dcd6 (diff)
downloadgcc-82e415a358f4c91851c7a0c194b159bd82edf116.zip
gcc-82e415a358f4c91851c7a0c194b159bd82edf116.tar.gz
gcc-82e415a358f4c91851c7a0c194b159bd82edf116.tar.bz2
function.c (expand_function_end): Output NOTE_REPEATED_LINE_NUMBER for last line of function.
* function.c (expand_function_end): Output NOTE_REPEATED_LINE_NUMBER for last line of function. From-SVN: r13815
Diffstat (limited to 'gcc/function.c')
-rw-r--r--gcc/function.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/function.c b/gcc/function.c
index b3c45b9..67594cb 100644
--- a/gcc/function.c
+++ b/gcc/function.c
@@ -5530,6 +5530,14 @@ expand_function_end (filename, line, end_bindings)
without returning a value. */
emit_note (NULL_PTR, NOTE_INSN_FUNCTION_END);
+ /* Must mark the last line number note in the function, so that the test
+ coverage code can avoid counting the last line twice. This just tells
+ the code to ignore the immediately following line note, since there
+ already exists a copy of this note somewhere above. This line number
+ note is still needed for debugging though, so we can't delete it. */
+ if (flag_test_coverage)
+ emit_note (NULL_PTR, NOTE_REPEATED_LINE_NUMBER);
+
/* Output a linenumber for the end of the function.
SDB depends on this. */
emit_line_note_force (filename, line);