diff options
author | Rafael Ávila de Espíndola <espindola@google.com> | 2009-03-26 13:26:56 +0000 |
---|---|---|
committer | Rafael Ávila de Espíndola <espindola@google.com> | 2009-03-26 13:26:56 +0000 |
commit | bd4aac5df08f2e13d65fbffa139e8558b5aad033 (patch) | |
tree | 81788c11fc7c88ce82522e76792766157d6d8d40 /gcc | |
parent | 972df18c4c992faa2290664aebd7b45027576484 (diff) |
2009-03-26 Rafael Avila de Espindola <espindola@google.com>
PR 39001
* dwarf2out.c (dwarf2out_do_cfi_asm): Make the check for
current_function_decl being null the first thing in the function.
git-svn-id: https://gcc.gnu.org/svn/gcc/branches/lto@145088 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog.lto | 6 | ||||
-rw-r--r-- | gcc/dwarf2out.c | 15 |
2 files changed, 16 insertions, 5 deletions
diff --git a/gcc/ChangeLog.lto b/gcc/ChangeLog.lto index d53920afefa..bfda6193582 100644 --- a/gcc/ChangeLog.lto +++ b/gcc/ChangeLog.lto @@ -1,3 +1,9 @@ +2009-03-26 Rafael Avila de Espindola <espindola@google.com> + + PR 39001 + * dwarf2out.c (dwarf2out_do_cfi_asm): Make the check for + current_function_decl being null the first thing in the function. + 2009-03-25 Rafael Avila de Espindola <espindola@google.com> Mainline merge @144635. diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index 28d9abea564..74484620856 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -139,6 +139,15 @@ int dwarf2out_do_cfi_asm (void) { int enc; + tree personality_decl; + + /* FIXME lto: current_function_decl is not set when this function is called, + so we cannot find the personality of the current function. For now we + return true here to avoid a crash. */ + if (!current_function_decl) + return true; + + personality_decl = DECL_FUNCTION_PERSONALITY (current_function_decl); #ifdef MIPS_DEBUGGING_INFO return false; @@ -146,11 +155,7 @@ dwarf2out_do_cfi_asm (void) if (!flag_dwarf2_cfi_asm || !dwarf2out_do_frame ()) return false; - /* FIXME lto: current_function_decl is not set when this function is called, - so we cannot find the personality of the current function. For now we - use the global eh_personality_decl, but this is probably wrong for the - case of a program with decls with different personality functions. */ - if (saved_do_cfi_asm || !eh_personality_decl || !current_function_decl) + if (saved_do_cfi_asm || !personality_decl) return true; if (!HAVE_GAS_CFI_PERSONALITY_DIRECTIVE) |