aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/pa
diff options
context:
space:
mode:
authorJohn David Anglin <dave.anglin@nrc-cnrc.gc.ca>2007-04-12 00:46:13 +0000
committerJohn David Anglin <danglin@gcc.gnu.org>2007-04-12 00:46:13 +0000
commit8c5e065b53c2a1e2ec1351654939891f52a102b4 (patch)
treece4239c742538bd518b02181dd6a3ef641ae0b92 /gcc/config/pa
parent0de107cf673a6519ace90b922fa8238290770297 (diff)
downloadgcc-8c5e065b53c2a1e2ec1351654939891f52a102b4.zip
gcc-8c5e065b53c2a1e2ec1351654939891f52a102b4.tar.gz
gcc-8c5e065b53c2a1e2ec1351654939891f52a102b4.tar.bz2
pa.c (pa_som_asm_init_sections): Ensure that cfun->machine is not null before emitting a .nsubspa directive.
* pa.c (pa_som_asm_init_sections): Ensure that cfun->machine is not null before emitting a .nsubspa directive. From-SVN: r123733
Diffstat (limited to 'gcc/config/pa')
-rw-r--r--gcc/config/pa/pa.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/config/pa/pa.c b/gcc/config/pa/pa.c
index a3bf38c..be55a85 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$");