This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Merging PCH to mainline


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>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]