aboutsummaryrefslogtreecommitdiff
path: root/gcc/gcov.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/gcov.c')
-rw-r--r--gcc/gcov.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/gcov.c b/gcc/gcov.c
index 64ab85c..c09d506 100644
--- a/gcc/gcov.c
+++ b/gcc/gcov.c
@@ -1097,7 +1097,8 @@ output_intermediate_file (FILE *gcov_file, source_info *src)
}
/* Follow with lines associated with the source file. */
- output_intermediate_line (gcov_file, &src->lines[line_num], line_num);
+ if (line_num < src->lines.size ())
+ output_intermediate_line (gcov_file, &src->lines[line_num], line_num);
}
}