From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18252 invoked by alias); 30 Sep 2002 20: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 18238 invoked by uid 71); 30 Sep 2002 20:06:01 -0000 Date: Mon, 30 Sep 2002 13:06:00 -0000 Message-ID: <20020930200601.18237.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-09/txt/msg00877.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: Reichelt Cc: gcc-gnats@gcc.gnu.org, gcc-bugs@gcc.gnu.org, nobody@gcc.gnu.org, y_fedor@ciam.ru, gcc-patches@gcc.gnu.org Subject: Re: c++/8067: g++ 3.2 internal error: Segmentation fault Date: Mon, 30 Sep 2002 21:58:33 +0200 --J/dobhs11T7y2rNN Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Bootstrapped on x86. (configured with --enable-languages=c,c++) Ok for closing c++/8067 ? Sebastian 2002-09-30 Sebastian Pop * decl.c (maybe_inject_for_scope_var): Handle the case when IDENTIFIER_BINDING is NULL. Index: decl.c =================================================================== RCS file: /cvsroot/gcc/gcc/gcc/cp/decl.c,v retrieving revision 1.937 diff -d -c -p -r1.937 decl.c *** decl.c 29 Sep 2002 11:53:48 -0000 1.937 --- decl.c 30 Sep 2002 18:03:41 -0000 *************** maybe_inject_for_scope_var (decl) *** 8006,8022 **** Otherwise, we need to preserve the temp slot for decl to last into the outer binding level. */ ! tree outer_binding ! = TREE_CHAIN (IDENTIFIER_BINDING (DECL_NAME (decl))); ! ! if (outer_binding && BINDING_LEVEL (outer_binding) == outer ! && (TREE_CODE (BINDING_VALUE (outer_binding)) ! == VAR_DECL) ! && DECL_DEAD_FOR_LOCAL (BINDING_VALUE (outer_binding))) { ! BINDING_VALUE (outer_binding) ! = DECL_SHADOWED_FOR_VAR (BINDING_VALUE (outer_binding)); ! current_binding_level->is_for_scope = 0; } else if (DECL_IN_MEMORY_P (decl)) preserve_temp_slots (DECL_RTL (decl)); --- 8006,8026 ---- Otherwise, we need to preserve the temp slot for decl to last into the outer binding level. */ ! tree ib, outer_binding; ! ib = IDENTIFIER_BINDING (DECL_NAME (decl)); ! if (ib) { ! outer_binding = TREE_CHAIN (ib); ! ! if (outer_binding && BINDING_LEVEL (outer_binding) == outer ! && (TREE_CODE (BINDING_VALUE (outer_binding)) ! == VAR_DECL) ! && DECL_DEAD_FOR_LOCAL (BINDING_VALUE (outer_binding))) ! { ! BINDING_VALUE (outer_binding) ! = DECL_SHADOWED_FOR_VAR (BINDING_VALUE (outer_binding)); ! current_binding_level->is_for_scope = 0; ! } } else if (DECL_IN_MEMORY_P (decl)) preserve_temp_slots (DECL_RTL (decl)); --J/dobhs11T7y2rNN Content-Type: text/x-c++src; charset=us-ascii Content-Disposition: attachment; filename="r1.cc" // { dg-do compile } // Copyright (C) 2002 Free Software Foundation, Inc. // Contributed by Sebastian Pop 30 Sep 2002 void foo() { for ( __PRETTY_FUNCTION__ ; ; ) ; } --J/dobhs11T7y2rNN--