]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR c++/8067 (g++ 3.2 internal error: Segmentation fault)
authorMark Mitchell <mark@codesourcery.com>
Thu, 24 Oct 2002 00:03:16 +0000 (00:03 +0000)
committerMark Mitchell <mmitchel@gcc.gnu.org>
Thu, 24 Oct 2002 00:03:16 +0000 (00:03 +0000)
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

gcc/cp/ChangeLog
gcc/cp/decl.c
gcc/testsuite/ChangeLog

index bd57ba555e3afd0bf80ee4919008c17471ef1f5d..6cf43ecd359a5d8adafe55e8bccc83ba1c8c90d6 100644 (file)
@@ -1,3 +1,9 @@
+2002-10-23  Mark Mitchell  <mark@codesourcery.com>
+
+       PR c++/8067
+       * decl.c (maybe_inject_for_scope_var): Ignore __FUNCTION__ and
+       related variables.
+
 2002-10-23  Mark Mitchell  <mark@codesourcery.com>
 
        PR c++/7679
index 01297831b5af6c1e1e1d151fd5a7c68a14e14123..095008d1b7841addc8406d7bf5fbb237eafb9f26 100644 (file)
@@ -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)
     {
index 27d4ed3b35b1296dd44d373a4c1512fc87085918..7d4131bbc02f03a4af35dd805c4154706f027d1c 100644 (file)
@@ -1,3 +1,8 @@
+2002-10-23  Mark Mitchell  <mark@codesourcery.com>
+
+       PR c++/8067
+       * g++.dg/lookup/pretty1.C: New test.
+
 2002-10-23  Mark Mitchell  <mark@codesourcery.com>
 
        PR c++/7679