From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24190 invoked by alias); 6 Oct 2002 19:06:02 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 24175 invoked by uid 71); 6 Oct 2002 19:06:02 -0000 Date: Sun, 06 Oct 2002 12:06:00 -0000 Message-ID: <20021006190602.24174.qmail@sources.redhat.com> To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, From: =?iso-8859-1?Q?Pop_S=E9bastian?= Subject: Re: c++/8067: g++ 3.2 internal error: Segmentation fault Reply-To: =?iso-8859-1?Q?Pop_S=E9bastian?= X-SW-Source: 2002-10/txt/msg00221.txt.bz2 List-Id: The following reply was made to PR c++/8067; it has been noted by GNATS. From: =?iso-8859-1?Q?Pop_S=E9bastian?= To: Jason Merrill Cc: Reichelt , gcc-gnats@gcc.gnu.org, y_fedor@ciam.ru, gcc-patches@gcc.gnu.org Subject: Re: c++/8067: g++ 3.2 internal error: Segmentation fault Date: Sun, 6 Oct 2002 20:59:50 +0200 Hi Jason, On Tue, Oct 01, 2002 at 10:44:24AM +0100, Jason Merrill wrote: > Thanks, but your patch is just a workaround; the problem is that we think > we're dealing with a variable declared in the for-init-stmt, but we really > aren't. Ok, so we have to teach G++ that __PRETTY_FUNCTION__ is not a local declaration in the FOR_INIT. > Either we need to add more tests to the enclosing if, or we need > to change current_binding_level when pushing __PRETTY_FUNCTION__. > What about the following patch for solving the PR following the first suggestion? Index: decl.c =================================================================== RCS file: /cvsroot/gcc/gcc/gcc/cp/decl.c,v retrieving revision 1.942 diff -d -u -p -r1.942 decl.c --- decl.c 2 Oct 2002 18:46:40 -0000 1.942 +++ decl.c 6 Oct 2002 18:48:16 -0000 @@ -8305,7 +8305,8 @@ cp_finish_decl (decl, init, asmspec_tree if (init) DECL_INITIAL (decl) = init; } - else if (TREE_CODE (CP_DECL_CONTEXT (decl)) == FUNCTION_DECL) + else if (TREE_CODE (CP_DECL_CONTEXT (decl)) == FUNCTION_DECL + && !DECL_PRETTY_FUNCTION_P (decl)) { /* This is a local declaration. */ if (doing_semantic_analysis_p ())