From 9f4a0384e1bffbdebebb0d565656ac1a69605168 Mon Sep 17 00:00:00 2001 From: danglin Date: Thu, 12 Apr 2007 00:46:13 +0000 Subject: [PATCH] * pa.c (pa_som_asm_init_sections): Ensure that cfun->machine is not null before emitting a .nsubspa directive. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@123733 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 5 +++++ gcc/config/pa/pa.c | 5 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 34c970e3dce..372f42fd246 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2007-04-11 John David Anglin + + * pa.c (pa_som_asm_init_sections): Ensure that cfun->machine is not + null before emitting a .nsubspa directive. + 2007-04-11 Diego Novillo * tree-ssa-alias.c (dump_mem_ref_stats): Do not call diff --git a/gcc/config/pa/pa.c b/gcc/config/pa/pa.c index a3bf38c0b43..be55a850052 100644 --- a/gcc/config/pa/pa.c +++ b/gcc/config/pa/pa.c @@ -9279,7 +9279,7 @@ som_output_text_section_asm_op (const void *data ATTRIBUTE_UNUSED) gcc_assert (TARGET_SOM); if (TARGET_GAS) { - if (cfun && !cfun->machine->in_nsubspa) + if (cfun && cfun->machine && !cfun->machine->in_nsubspa) { /* We only want to emit a .nsubspa directive once at the start of the function. */ @@ -9304,7 +9304,8 @@ som_output_text_section_asm_op (const void *data ATTRIBUTE_UNUSED) text section to output debugging information. Thus, we need to forget that we are in the text section so that varasm.c will call us when text_section is selected again. */ - gcc_assert (!cfun || cfun->machine->in_nsubspa == 2); + gcc_assert (!cfun || !cfun->machine + || cfun->machine->in_nsubspa == 2); in_section = NULL; } output_section_asm_op ("\t.SPACE $TEXT$\n\t.NSUBSPA $CODE$"); -- 2.11.0