Comment 20 for bug 809768

Revision history for this message
Richard Sandiford (rsandifo) wrote :

FWIW -- and it took me depressingly long to figure this out --
the easiest way of making sure that the bug triggers is to
recompile dwarf2out.c with -O0. The segfault comes from
the rhs of the size assignment here:

  gcc_assert (GET_CODE (regs) == PARALLEL);

  size = GET_MODE_SIZE (GET_MODE (XVECEXP (regs, 0, 0)));
  loc_result = NULL;

The assignment is dead, so a sufficiently clever compiler
will optimise it (and the segfault) away.