[Bug preprocessor/92296] [8 Regression] internal compiler error: Segmentation fault #pragma push_macro("__LINE__")

2019-11-21 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92296

--- Comment #18 from Jakub Jelinek  ---
Author: jakub
Date: Thu Nov 21 17:15:56 2019
New Revision: 278581

URL: https://gcc.gnu.org/viewcvs?rev=278581&root=gcc&view=rev
Log:
Backported from mainline
2019-10-31  Jakub Jelinek  

PR preprocessor/92296
* internal.h (struct def_pragma_macro): Add is_builtin bitfield.
(_cpp_restore_special_builtin): Declare.
* init.c (_cpp_restore_special_builtin): New function.
* directives.c (do_pragma_push_macro): For NT_MACRO with NODE_BUILTIN
set is_builtin and don't try to grab definition.
(cpp_pop_definition): Use _cpp_restore_special_builtin to restore
builtin macros.

* c-c++-common/cpp/pr92296-1.c: New test.
* c-c++-common/cpp/pr92296-2.c: New test.

Added:
branches/gcc-8-branch/gcc/testsuite/c-c++-common/cpp/pr92296-1.c
branches/gcc-8-branch/gcc/testsuite/c-c++-common/cpp/pr92296-2.c
Modified:
branches/gcc-8-branch/gcc/testsuite/ChangeLog
branches/gcc-8-branch/libcpp/ChangeLog
branches/gcc-8-branch/libcpp/directives.c
branches/gcc-8-branch/libcpp/init.c
branches/gcc-8-branch/libcpp/internal.h

[Bug preprocessor/92296] [8 Regression] internal compiler error: Segmentation fault #pragma push_macro("__LINE__")

2019-11-22 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92296

Jakub Jelinek  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #19 from Jakub Jelinek  ---
Fixed for 8.4+ too.