From: Mark Mitchell Date: Tue, 7 Dec 1999 07:38:21 +0000 (+0000) Subject: tree.c (walk_tree): Don't recurse into DECL_INITIAL or DECL_SIZE unless... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2fb9811eacce6e68f6a05a63e11bbcb03f7002c5;p=gcc.git 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 --- 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; +}