[Bug c/18963] [4.0 Regression] static and nested declarations cause an ice
--- Additional Comments From phython at gcc dot gnu dot org 2004-12-21 17:11 --- Removed some code and fixed a bug. That looks like a good thing. -- What|Removed |Added Status|NEW |RESOLVED Resolution||FIXED http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18963
[Bug c/18963] [4.0 Regression] static and nested declarations cause an ice
--- Additional Comments From cvs-commit at gcc dot gnu dot org 2004-12-21 17:07 --- Subject: Bug 18963 CVSROOT:/cvs/gcc Module name:gcc Changes by: [EMAIL PROTECTED] 2004-12-21 17:07:06 Modified files: gcc: c-decl.c ChangeLog gcc/testsuite : ChangeLog Added files: gcc/testsuite/gcc.dg: pr18963-1.c Log message: 2004-12-21 James A. Morrison <[EMAIL PROTECTED]> PR c/18963 * c-decl.c (pushdecl): Remove block trying to merge static function declarations at block scope to file scope declarations. testsuite: PR c/18963 * gcc.dg/pr18963-1.c: New test. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/c-decl.c.diff?cvsroot=gcc&r1=1.618&r2=1.619 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.6911&r2=2.6912 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.4789&r2=1.4790 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/pr18963-1.c.diff?cvsroot=gcc&r1=NONE&r2=1.1 -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18963
[Bug c/18963] [4.0 Regression] static and nested declarations cause an ice
--- Additional Comments From phython at gcc dot gnu dot org 2004-12-15 20:46 --- Good, that is the result I was expecting. Anyway, removing the block following: if (TREE_CODE (x) == FUNCTION_DECL && scope != file_scope && !TREE_PUBLIC (x) && !DECL_INITIAL (x)) from c-decl.c (pushdecl:2066) fixes the ice and the testcase works at -O0. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18963
[Bug c/18963] [4.0 Regression] static and nested declarations cause an ice
--- Additional Comments From joseph at codesourcery dot com 2004-12-15 17:41 --- Subject: Re: New: static and nested declarations cause an ice On Mon, 13 Dec 2004, phython at gcc dot gnu dot org wrote: > The following testcase ices with mainline. > static int barf (); > > int foo () { > int j = 4; > auto int barf (); > > int barf () { > return j; > } > > return barf (); > } > > static int barf () { > return 3; > } > > What should the result be anyway? 4 (within the scope where the nested function is declared, it should shadow the static function). -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18963
[Bug c/18963] [4.0 Regression] static and nested declarations cause an ice
--- Additional Comments From pinskia at gcc dot gnu dot org 2004-12-13 18:55 --- Most likely we started to reject this with: 2004-07-02 Zack Weinberg <[EMAIL PROTECTED]> * c-decl.c (struct c_binding): Remove contour field; add depth, invisible, nested fields. And most likely started to ICE with: 2004-07-09 Zack Weinberg <[EMAIL PROTECTED]> Andrew Pinski <[EMAIL PROTECTED]> * c-opts.c (c_common_post_options): Force unit-at-a-time mode on when we have more than one input file. I cannot be the person who makes the discussion if we should accept this or not. -- What|Removed |Added CC||pinskia at gcc dot gnu dot ||org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18963
[Bug c/18963] [4.0 Regression] static and nested declarations cause an ice
--- Additional Comments From pinskia at gcc dot gnu dot org 2004-12-13 18:47 --- It used to be accepted : Search converges between 2004-07-02-trunk (#477) and 2004-07-04-trunk (#478). It started to ICE: : Search converges between 2004-07-09-trunk (#483) and 2004-07-12-trunk (#484). -- What|Removed |Added Status|UNCONFIRMED |NEW Ever Confirmed||1 Last reconfirmed|-00-00 00:00:00 |2004-12-13 18:47:16 date|| Summary|static and nested |[4.0 Regression] static and |declarations cause an ice |nested declarations cause an ||ice Target Milestone|--- |4.0.0 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18963