This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Merging PCH to mainline
- From: Geoff Keating <geoffk at geoffk dot org>
- To: David Edelsohn <dje at watson dot ibm dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: 10 Jan 2003 19:05:32 -0800
- Subject: Re: Merging PCH to mainline
- References: <geoffk@geoffk.org> <200301110251.VAA25050@makai.watson.ibm.com>
David Edelsohn <dje@watson.ibm.com> writes:
> I have tracked down another PCH-related rs6000 failure and I can
> fix it by adding GTY(()), but I would have thought that the logic is
> correct now and adding PCH machinery wrong.
>
> The bug is when compiling with PCH, GCC emits the assembler extern
> declarations of the AIX common-mode functions for each function compiled
> instead of once with the first function in the file. Emitting declaration
> is controlled by a static variable common_mode_defined in rs6000.c.
> Adding GTY(()) to the declaration produces correct behavior, but this
> should not be information associated with PCH, so I do not understand why
> restoring its state should be correct.
No, this is right. PCH saves and restores the state of the assembler
file (well, not quite all, it saves from the point before lexing
starts, so initial header information gets regenerated). So, any
variables indicating state of the assembler output need to be saved
and restored.
--
- Geoffrey Keating <geoffk@geoffk.org>