diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2018-01-10 20:59:04 +0000 |
---|---|---|
committer | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2018-01-10 20:59:04 +0000 |
commit | 88324fd006d3ba0ed4808cc0b3569b8c6af29624 (patch) | |
tree | 2a21c5a4a7d089b5778ee2f808379cc1362dda99 | |
parent | 2025a48d089d09011b60c1f5eb981ef71c79be4e (diff) | |
download | gcc-88324fd006d3ba0ed4808cc0b3569b8c6af29624.zip gcc-88324fd006d3ba0ed4808cc0b3569b8c6af29624.tar.gz gcc-88324fd006d3ba0ed4808cc0b3569b8c6af29624.tar.bz2 |
* dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
From-SVN: r256454
-rw-r--r-- | gcc/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/dwarf2out.c | 9 |
2 files changed, 11 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 7a989b4..413f24c 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2018-01-10 Eric Botcazou <ebotcazou@adacore.com> + + * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf. + 2018-01-10 Peter Bergner <bergner@vnet.ibm.com> PR target/83399 diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index b70856f..fc20656 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 = " "; |