tree.c (walk_tree): Don't recurse into DECL_INITIAL or DECL_SIZE unless...
authorMark Mitchell <mmitchel@gcc.gnu.org>
Tue, 7 Dec 1999 07:38:21 +0000 (07:38 +0000)
committerMark Mitchell <mmitchel@gcc.gnu.org>
Tue, 7 Dec 1999 07:38:21 +0000 (07:38 +0000)
* tree.c (walk_tree): Don't recurse into DECL_INITIAL or DECL_SIZE
unless we're declaring the variable in question.

From-SVN: r30815

gcc/testsuite/g++.old-deja/g++.other/decl7.C [new file with mode: 0644]

diff --git a/gcc/testsuite/g++.old-deja/g++.other/decl7.C b/gcc/testsuite/g++.old-deja/g++.other/decl7.C
new file mode 100644 (file)
index 0000000..7f547f6
--- /dev/null
@@ -0,0 +1,13 @@
+// Build don't link:
+// Origin: Mark Mitchell <mark@codesourcery.com>
+
+struct S 
+{
+  void* sp;
+};
+
+void* f ()
+{
+  struct S s = { &s.sp };
+  return s.sp;
+}