aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite
diff options
context:
space:
mode:
authorMark Mitchell <mark@codesourcery.com>1999-10-09 21:06:03 +0000
committerMark Mitchell <mmitchel@gcc.gnu.org>1999-10-09 21:06:03 +0000
commitf301014645f6ec88d2c543fba1e26a2f2418c40a (patch)
tree8aa5a888de758612c31c5b837bb35ab0f091e001 /gcc/testsuite
parentab61414260712684d8f75c8550933f24e0d1df22 (diff)
downloadgcc-f301014645f6ec88d2c543fba1e26a2f2418c40a.zip
gcc-f301014645f6ec88d2c543fba1e26a2f2418c40a.tar.gz
gcc-f301014645f6ec88d2c543fba1e26a2f2418c40a.tar.bz2
cp-tree.h (make_rtl_for_local_static): New function.
* cp-tree.h (make_rtl_for_local_static): New function. * decl.c (make_rtl_for_nonlocal_decl): Move code to create RTL for local statics ... (make_rtl_for_local_static): Here. * semantics.c (expand_stmt): Use make_rtl_for_local_static. From-SVN: r29879
Diffstat (limited to 'gcc/testsuite')
-rw-r--r--gcc/testsuite/g++.old-deja/g++.other/static10.C16
1 files changed, 16 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.other/static10.C b/gcc/testsuite/g++.old-deja/g++.other/static10.C
new file mode 100644
index 0000000..212191c
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.other/static10.C
@@ -0,0 +1,16 @@
+// Build don't link:
+// Origin: Ulrich Drepper <drepper@cygnus.com>
+
+struct st
+{
+ int a;
+};
+
+int
+foo (int a)
+{
+ static const st i = { 0 };
+
+ if (i.a == a)
+ return 0;
+}