http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58381

--- Comment #1 from Martin Husemann <martin at netbsd dot org> ---
The global pointer "line_table" is changed to the contents of the precompiled
header file in gt_pch_restore in this loop:

  /* Read in all the global pointers, in 6 easy loops.  */
  for (rt = gt_ggc_rtab; *rt; rt++)
    for (rti = *rt; rti->base != NULL; rti++)
      for (i = 0; i < rti->nelt; i++)
        if (fread ((char *)rti->base + rti->stride * i,
                   sizeof (void *), 1, f) != 1)
          fatal_error ("can%'t read PCH file: %m");

but not reset to the previous values when the compiler decides to not use the
pch contents (for example because the address of the mmap differs).

We probably need to save at least line_table (and maybe input_location) at the
start of this function and restore it before invoking fatal_error.

Reply via email to