From: Mark Mitchell Date: Thu, 17 Feb 2000 20:44:22 +0000 (+0000) Subject: stmt.c (set_file_and_line_for_stmt): Don't crash if cfun->stmt isn't set. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=61d846051ae429fed1dff76cbb1db42f7b82bfdc;p=gcc.git stmt.c (set_file_and_line_for_stmt): Don't crash if cfun->stmt isn't set. * stmt.c (set_file_and_line_for_stmt): Don't crash if cfun->stmt isn't set. From-SVN: r32041 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 79503b724a6..84f36e5e4df 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,8 @@ 2000-02-17 Mark Mitchell + * stmt.c (set_file_and_line_for_stmt): Don't crash if cfun->stmt + isn't set. + * invoke.texi (-fmessage-length=n): Document. 2000-02-17 Jason Merrill diff --git a/gcc/stmt.c b/gcc/stmt.c index 1b98bb589e8..0c4117315be 100644 --- a/gcc/stmt.c +++ b/gcc/stmt.c @@ -641,8 +641,14 @@ set_file_and_line_for_stmt (file, line) char *file; int line; { - emit_filename = file; - emit_lineno = line; + /* If we're outputting an inline function, and we add a line note, + there may be no CFUN->STMT information. So, there's no need to + update it. */ + if (cfun->stmt) + { + emit_filename = file; + emit_lineno = line; + } } /* Emit a no-op instruction. */