From: Jakub Jelinek Date: Fri, 20 Dec 2019 17:23:34 +0000 (+0100) Subject: backport: re PR debug/92664 (Wrong .debug_line section information when compiling... X-Git-Tag: releases/gcc-9.3.0~295 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=92059b60e67b614a590261c13a32239549f29c61;p=thirdparty%2Fgcc.git backport: re PR debug/92664 (Wrong .debug_line section information when compiling stdin input with -g3) Backported from mainline 2019-11-27 Jakub Jelinek PR debug/92664 * dwarf2out.c (lookup_filename): Use "" instead of "". From-SVN: r279658 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 1a925cae4e5e..41b10d6c27dd 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,6 +1,11 @@ 2019-12-20 Jakub Jelinek Backported from mainline + 2019-11-27 Jakub Jelinek + + PR debug/92664 + * dwarf2out.c (lookup_filename): Use "" instead of "". + 2019-11-26 Jakub Jelinek PR tree-optimization/92644 diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index ae47387b763f..67a6bc92077d 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -27057,6 +27057,9 @@ lookup_filename (const char *file_name) if (!file_name) return NULL; + if (!file_name[0]) + file_name = ""; + dwarf_file_data **slot = file_table->find_slot_with_hash (file_name, htab_hash_string (file_name), INSERT);