aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2019-11-27 01:23:39 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2019-11-27 01:23:39 +0100
commit88b34a4811a0a5237138bbd6700202c2f3569c7d (patch)
tree02948ba940972337d3affabe0a279d9805ef578a
parentb592c0ea8646089272920ce82ff504e7115056e6 (diff)
downloadgcc-88b34a4811a0a5237138bbd6700202c2f3569c7d.zip
gcc-88b34a4811a0a5237138bbd6700202c2f3569c7d.tar.gz
gcc-88b34a4811a0a5237138bbd6700202c2f3569c7d.tar.bz2
re PR debug/92664 (Wrong .debug_line section information when compiling stdin input with -g3)
PR debug/92664 * dwarf2out.c (lookup_filename): Use "<stdin>" instead of "". From-SVN: r278752
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/dwarf2out.c3
2 files changed, 8 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 205c489..ecade7b 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2019-11-27 Jakub Jelinek <jakub@redhat.com>
+
+ PR debug/92664
+ * dwarf2out.c (lookup_filename): Use "<stdin>" instead of "".
+
2019-11-26 Martin Sebor <msebor@redhat.com>
PR tree-optimization/92683
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index 9f1d921..6fb345b 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -27118,6 +27118,9 @@ lookup_filename (const char *file_name)
if (!file_name)
return NULL;
+ if (!file_name[0])
+ file_name = "<stdin>";
+
dwarf_file_data **slot
= file_table->find_slot_with_hash (file_name, htab_hash_string (file_name),
INSERT);