From: Mark Mitchell Date: Thu, 24 Oct 2002 00:03:16 +0000 (+0000) Subject: re PR c++/8067 (g++ 3.2 internal error: Segmentation fault) X-Git-Tag: releases/gcc-3.2.1~110 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ec876266b673181bd8b88d46ffa2210dc73b27e8;p=thirdparty%2Fgcc.git re PR c++/8067 (g++ 3.2 internal error: Segmentation fault) PR c++/8067 * decl.c (maybe_inject_for_scope_var): Ignore __FUNCTION__ and related variables. PR c++/8067 * g++.dg/lookup/pretty1.C: New test. From-SVN: r58479 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index bd57ba555e3a..6cf43ecd359a 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +2002-10-23 Mark Mitchell + + PR c++/8067 + * decl.c (maybe_inject_for_scope_var): Ignore __FUNCTION__ and + related variables. + 2002-10-23 Mark Mitchell PR c++/7679 diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index 01297831b5af..095008d1b784 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -8026,6 +8026,12 @@ maybe_inject_for_scope_var (decl) { if (!DECL_NAME (decl)) return; + + /* Declarations of __FUNCTION__ and its ilk appear magically when + the variable is first used. If that happens to be inside a + for-loop, we don't want to do anything special. */ + if (DECL_PRETTY_FUNCTION_P (decl)) + return; if (current_binding_level->is_for_scope) { diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 27d4ed3b35b1..7d4131bbc02f 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2002-10-23 Mark Mitchell + + PR c++/8067 + * g++.dg/lookup/pretty1.C: New test. + 2002-10-23 Mark Mitchell PR c++/7679