[Bug c/93072] [8/9/10 Regression] ICE: gimplifier segfault with undefined nested function
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93072 Joseph S. Myers changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #7 from Joseph S. Myers --- Fixed for GCC 8.4, GCC 9.3, GCC 10.
[Bug c/93072] [8/9/10 Regression] ICE: gimplifier segfault with undefined nested function
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93072 --- Comment #6 from CVS Commits --- The releases/gcc-8 branch has been updated by Joseph Myers : https://gcc.gnu.org/g:67cceb6c538b7a10cd5cf5693bce7fc7a646581d commit r8-9938-g67cceb6c538b7a10cd5cf5693bce7fc7a646581d Author: Joseph Myers Date: Wed Jan 15 22:33:04 2020 + Fix setting of DECL_CONTEXT in pushdecl (PR c/93072). Bug 93072 is a case where the C front end (a) wrongly interprets an inline declaration at block scope as indicating that DECL_CONTEXT should be set for an inline function and (b) this results in an ICE. This is a regression resulting from a previous fix of mine for other bugs involving such declarations being wrongly interpreted elsewhere as nested function declarations. The fix is similar to the previous fix: use TREE_PUBLIC instead of DECL_EXTERNAL in another place as the relevant test to determine whether to set DECL_CONTEXT. (When a variable reaches the code in question in pushdecl, the two are equivalent.) Bootstrapped with no regressions for x86_64-pc-linux-gnu. PR c/93072 gcc/c: * c-decl.c (pushdecl): Use TREE_PUBLIC, not DECL_EXTERNAL, to determine whether to set DECL_CONTEXT. gcc/testsuite: * gcc.dg/inline-42.c, gcc.dg/inline-43.c: New tests. (cherry picked from commit e2346a33b05871fc065815d4cfd531dfa0195507)
[Bug c/93072] [8/9/10 Regression] ICE: gimplifier segfault with undefined nested function
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93072 --- Comment #5 from CVS Commits --- The releases/gcc-9 branch has been updated by Joseph Myers : https://gcc.gnu.org/g:7cc6b679a0d0e50c0e1671fefa815dc753554184 commit r9-8136-g7cc6b679a0d0e50c0e1671fefa815dc753554184 Author: Joseph Myers Date: Wed Jan 15 20:52:45 2020 + Fix setting of DECL_CONTEXT in pushdecl (PR c/93072). Bug 93072 is a case where the C front end (a) wrongly interprets an inline declaration at block scope as indicating that DECL_CONTEXT should be set for an inline function and (b) this results in an ICE. This is a regression resulting from a previous fix of mine for other bugs involving such declarations being wrongly interpreted elsewhere as nested function declarations. The fix is similar to the previous fix: use TREE_PUBLIC instead of DECL_EXTERNAL in another place as the relevant test to determine whether to set DECL_CONTEXT. (When a variable reaches the code in question in pushdecl, the two are equivalent.) Bootstrapped with no regressions for x86_64-pc-linux-gnu. PR c/93072 gcc/c: * c-decl.c (pushdecl): Use TREE_PUBLIC, not DECL_EXTERNAL, to determine whether to set DECL_CONTEXT. gcc/testsuite: * gcc.dg/inline-42.c, gcc.dg/inline-43.c: New tests. (cherry picked from commit e2346a33b05871fc065815d4cfd531dfa0195507)
[Bug c/93072] [8/9/10 Regression] ICE: gimplifier segfault with undefined nested function
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93072 --- Comment #4 from CVS Commits --- The master branch has been updated by Joseph Myers : https://gcc.gnu.org/g:e2346a33b05871fc065815d4cfd531dfa0195507 commit r10-5972-ge2346a33b05871fc065815d4cfd531dfa0195507 Author: Joseph Myers Date: Wed Jan 15 02:54:27 2020 + Fix setting of DECL_CONTEXT in pushdecl (PR c/93072). Bug 93072 is a case where the C front end (a) wrongly interprets an inline declaration at block scope as indicating that DECL_CONTEXT should be set for an inline function and (b) this results in an ICE. This is a regression resulting from a previous fix of mine for other bugs involving such declarations being wrongly interpreted elsewhere as nested function declarations. The fix is similar to the previous fix: use TREE_PUBLIC instead of DECL_EXTERNAL in another place as the relevant test to determine whether to set DECL_CONTEXT. (When a variable reaches the code in question in pushdecl, the two are equivalent.) Bootstrapped with no regressions for x86_64-pc-linux-gnu. PR c/93072 gcc/c: * c-decl.c (pushdecl): Use TREE_PUBLIC, not DECL_EXTERNAL, to determine whether to set DECL_CONTEXT. gcc/testsuite: * gcc.dg/inline-42.c, gcc.dg/inline-43.c: New tests.
[Bug c/93072] [8/9/10 Regression] ICE: gimplifier segfault with undefined nested function
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93072 --- Comment #3 from Joseph S. Myers --- This is not actually a nested function; it's another case of a non-nested function (a valid declaration at block scope) wrongly being interpreted as nested. Working on a patch.
[Bug c/93072] [8/9/10 Regression] ICE: gimplifier segfault with undefined nested function
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93072 Richard Biener changed: What|Removed |Added Priority|P3 |P2
[Bug c/93072] [8/9/10 Regression] ICE: gimplifier segfault with undefined nested function
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93072 Jakub Jelinek changed: What|Removed |Added CC||jakub at gcc dot gnu.org, ||jsm28 at gcc dot gnu.org Target Milestone|--- |8.4 --- Comment #2 from Jakub Jelinek --- Started with r267665 aka PR88720 and PR88726 fix.
[Bug c/93072] [8/9/10 Regression] ICE: gimplifier segfault with undefined nested function
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93072 Alexander Monakov changed: What|Removed |Added Keywords||ice-on-invalid-code Status|UNCONFIRMED |NEW Last reconfirmed||2019-12-25 CC||amonakov at gcc dot gnu.org Summary|ICE: Segmentation fault |[8/9/10 Regression] ICE: ||gimplifier segfault with ||undefined nested function Ever confirmed|0 |1 --- Comment #1 from Alexander Monakov --- ICEs since gcc-7; gcc-6 just diagnosed a nested function with no body as invalid.