aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorMark Mitchell <mark@codesourcery.com>2000-02-17 20:44:22 +0000
committerMark Mitchell <mmitchel@gcc.gnu.org>2000-02-17 20:44:22 +0000
commit61d846051ae429fed1dff76cbb1db42f7b82bfdc (patch)
tree88f4c43f30e6db5ad0c695b137d92f6372f8f039 /gcc
parent277576eefcc91cb00fad847f48b153a234227b8a (diff)
downloadgcc-61d846051ae429fed1dff76cbb1db42f7b82bfdc.zip
gcc-61d846051ae429fed1dff76cbb1db42f7b82bfdc.tar.gz
gcc-61d846051ae429fed1dff76cbb1db42f7b82bfdc.tar.bz2
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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog3
-rw-r--r--gcc/stmt.c10
2 files changed, 11 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 79503b7..84f36e5 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,8 @@
2000-02-17 Mark Mitchell <mark@codesourcery.com>
+ * 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 <jason@casey.cygnus.com>
diff --git a/gcc/stmt.c b/gcc/stmt.c
index 1b98bb5..0c41173 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. */