* cgen.c (gas_cgen_parse_operand): Guard against NULL pointers.
[deliverable/binutils-gdb.git] / gas / cgen.c
index 178402af27bc8a1d4c8e67eff739fe7d048a3b18..79a46f668a964262f45ef9efc4ce06b45be115ba 100644 (file)
@@ -452,9 +452,10 @@ gas_cgen_parse_operand (cd, want, strP, opindex, opinfo, resultP, valueP)
          if (exp.X_op == O_symbol
              && reloc_type == BFD_RELOC_RELC
              && exp.X_add_symbol->sy_value.X_op == O_constant
-             && exp.X_add_symbol->bsym->section != expr_section
-             && exp.X_add_symbol->bsym->section != absolute_section
-             && exp.X_add_symbol->bsym->section != undefined_section)
+             && (!exp.X_add_symbol->bsym
+                 || (exp.X_add_symbol->bsym->section != expr_section
+                     && exp.X_add_symbol->bsym->section != absolute_section
+                     && exp.X_add_symbol->bsym->section != undefined_section)))
            {
              /* Local labels will have been (eagerly) turned into constants
                 by now, due to the inappropriately deep insight of the
This page took 0.024334 seconds and 4 git commands to generate.