[Bug c/15007] [3.5 Regression] crash when including precompiled header with -include

geoffk at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Thu Apr 22 08:38:00 GMT 2004


------- Additional Comments From geoffk at gcc dot gnu dot org  2004-04-22 05:39 -------
The problem is that there are two TRANSLATION_UNIT_DECLs.  One appears to come from the PCH file, 
and is incomplete.  I am not sure where the other one comes from; possibly it is created after the PCH 
file is loaded.  There should, of course, be only one TRANSLATION_UNIT_DECL, since there is only one 
translation unit.  So, I suspect a problem with the timing of PCH saving and/or restoring.

I've confirmed that this crash does not happen immedately before Zack's 2004-03-23 patch, and does 
happen immediately after it was applied.  I find it particularly suspicious that this patch introduced a 
number of constructs of the form "if (pch_file) return;"; such constructs were not necessary before, and 
it is likely that these are bandaids for deeper problems.


-- 


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



More information about the Gcc-bugs mailing list