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

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

--- Comment #15 from Jakub Jelinek  ---
Author: jakub
Date: Fri Nov  8 18:59:14 2019
New Revision: 277987

URL: https://gcc.gnu.org/viewcvs?rev=277987=gcc=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_BUILTIN_MACRO
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-9-branch/gcc/testsuite/c-c++-common/cpp/pr92296-1.c
branches/gcc-9-branch/gcc/testsuite/c-c++-common/cpp/pr92296-2.c
Modified:
branches/gcc-9-branch/gcc/testsuite/ChangeLog
branches/gcc-9-branch/libcpp/ChangeLog
branches/gcc-9-branch/libcpp/directives.c
branches/gcc-9-branch/libcpp/init.c
branches/gcc-9-branch/libcpp/internal.h

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

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

Jakub Jelinek  changed:

   What|Removed |Added

 CC||Keith.S.Thompson at gmail dot 
com

--- Comment #13 from Jakub Jelinek  ---
*** Bug 69665 has been marked as a duplicate of this bug. ***

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

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

Jakub Jelinek  changed:

   What|Removed |Added

 CC||daniel at hebirobotics dot com

--- Comment #14 from Jakub Jelinek  ---
*** Bug 87181 has been marked as a duplicate of this bug. ***

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

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

Jakub Jelinek  changed:

   What|Removed |Added

   Target Milestone|10.0|7.5
Summary|[10 Regression] GCC build   |[7/8/9 Regression] internal
   |ICE on MinGW-w64. internal  |compiler error:
   |compiler error: |Segmentation fault  #pragma
   |Segmentation fault  #pragma |push_macro("__LINE__")
   |push_macro("__has_builtin") |

--- Comment #12 from Jakub Jelinek  ---
Fixed on the trunk, keeping open for backports to release branches (where we'll
need to leave out the __has_builtin part of the testcase obviously).