diff options
author | Geoffrey Keating <geoffk@apple.com> | 2005-04-12 01:45:43 +0000 |
---|---|---|
committer | Geoffrey Keating <geoffk@gcc.gnu.org> | 2005-04-12 01:45:43 +0000 |
commit | 92b0bb67877046d21c1b208410f38081c82ff862 (patch) | |
tree | 509797858a935c215529b6d39249e06cd5095ee4 /gcc/dwarf2out.c | |
parent | b52485c6316e1ff68572720da538e93e6ad70b83 (diff) | |
download | gcc-92b0bb67877046d21c1b208410f38081c82ff862.tar.gz |
dwarf2out.c (output_line_info): Don't try to dereference a NULL current_function_decl.
* dwarf2out.c (output_line_info): Don't try to dereference
a NULL current_function_decl.
From-SVN: r98000
Diffstat (limited to 'gcc/dwarf2out.c')
-rw-r--r-- | gcc/dwarf2out.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index a7b2b86a009..aebefd4e29c 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -7662,7 +7662,7 @@ output_line_info (void) long line_delta; unsigned long current_file; unsigned long function; - struct function *cfun = DECL_STRUCT_FUNCTION (current_function_decl); + struct function *cfun; ASM_GENERATE_INTERNAL_LABEL (l1, LINE_NUMBER_BEGIN_LABEL, 0); ASM_GENERATE_INTERNAL_LABEL (l2, LINE_NUMBER_END_LABEL, 0); @@ -7732,6 +7732,11 @@ output_line_info (void) a series of state machine operations. */ current_file = 1; current_line = 1; + + if (current_function_decl) + cfun = DECL_STRUCT_FUNCTION (current_function_decl); + else + cfun = NULL; if (last_text_section == in_unlikely_executed_text || (last_text_section == in_named && last_text_section_name == cfun->unlikely_text_section_name)) |