From 2fb9811eacce6e68f6a05a63e11bbcb03f7002c5 Mon Sep 17 00:00:00 2001 From: Mark Mitchell Date: Tue, 7 Dec 1999 07:38:21 +0000 Subject: [PATCH] tree.c (walk_tree): Don't recurse into DECL_INITIAL or DECL_SIZE unless... * 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 | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 gcc/testsuite/g++.old-deja/g++.other/decl7.C 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 index 00000000000..7f547f6928d --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.other/decl7.C @@ -0,0 +1,13 @@ +// Build don't link: +// Origin: Mark Mitchell + +struct S +{ + void* sp; +}; + +void* f () +{ + struct S s = { &s.sp }; + return s.sp; +}