[Bug pch/112319] [14 Regression] segfault with pch and #pragma GCC diagnostic

2023-11-24 Thread lhyatt at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112319

Lewis Hyatt  changed:

   What|Removed |Added

 Resolution|--- |FIXED
 Status|NEW |RESOLVED

--- Comment #4 from Lewis Hyatt  ---
Fixed now.

[Bug pch/112319] [14 Regression] segfault with pch and #pragma GCC diagnostic

2023-11-24 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112319

--- Comment #3 from CVS Commits  ---
The master branch has been updated by Lewis Hyatt :

https://gcc.gnu.org/g:5d4abd9219dfa53b52b341255e99139bb6cad302

commit r14-5836-g5d4abd9219dfa53b52b341255e99139bb6cad302
Author: Lewis Hyatt 
Date:   Wed Nov 1 13:01:12 2023 -0400

preprocessor: Reinitialize frontend parser after loading a PCH [PR112319]

Since r14-2893, the frontend parser object needs to exist when running in
preprocess-only mode, because pragma_lex() is now called in that mode and
needs to make use of it. This is handled by calling c_init_preprocess() at
startup. If -fpch-preprocess is in effect (commonly, because of
-save-temps), a PCH file may be loaded during preprocessing, in which
case the parser will be destroyed, causing the issue noted in the
PR. Resolve it by reinitializing the frontend parser after loading the PCH.

gcc/c-family/ChangeLog:

PR pch/112319
* c-ppoutput.cc (cb_read_pch): Reinitialize the frontend parser
after loading a PCH.

gcc/testsuite/ChangeLog:

PR pch/112319
* g++.dg/pch/pr112319.C: New test.
* g++.dg/pch/pr112319.Hs: New test.
* gcc.dg/pch/pr112319.c: New test.
* gcc.dg/pch/pr112319.hs: New test.

[Bug pch/112319] [14 Regression] segfault with pch and #pragma GCC diagnostic

2023-11-02 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112319

Richard Biener  changed:

   What|Removed |Added

   Priority|P3  |P1

[Bug pch/112319] [14 Regression] segfault with pch and #pragma GCC diagnostic

2023-11-01 Thread lhyatt at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112319

--- Comment #2 from Lewis Hyatt  ---
Patch sent for review:
https://gcc.gnu.org/pipermail/gcc-patches/2023-November/634931.html

[Bug pch/112319] [14 Regression] segfault with pch and #pragma GCC diagnostic

2023-10-31 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112319

Andrew Pinski  changed:

   What|Removed |Added

   Target Milestone|--- |14.0
Summary|segfault with pch and   |[14 Regression] segfault
   |#pragma GCC diagnostic  |with pch and #pragma GCC
   ||diagnostic
   Keywords||ice-on-valid-code