From: Eric Botcazou Date: Wed, 10 Jan 2018 20:59:04 +0000 (+0000) Subject: * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=88324fd006d3ba0ed4808cc0b3569b8c6af29624;p=gcc.git * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf. From-SVN: r256454 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 7a989b42c4c..413f24cf860 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2018-01-10 Eric Botcazou + + * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf. + 2018-01-10 Peter Bergner PR target/83399 diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index b70856fce8b..fc206562abe 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -26584,11 +26584,16 @@ create_label: if (var_loc_p && flag_debug_asm) { - const char *name = NULL, *sep = " => ", *patstr = NULL; + const char *name, *sep, *patstr; if (decl && DECL_NAME (decl)) name = IDENTIFIER_POINTER (DECL_NAME (decl)); + else + name = ""; if (NOTE_VAR_LOCATION_LOC (loc_note)) - patstr = str_pattern_slim (NOTE_VAR_LOCATION_LOC (loc_note)); + { + sep = " => "; + patstr = str_pattern_slim (NOTE_VAR_LOCATION_LOC (loc_note)); + } else { sep = " ";