aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/opt/static2.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.dg/opt/static2.C')
-rw-r--r--gcc/testsuite/g++.dg/opt/static2.C13
1 files changed, 13 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/opt/static2.C b/gcc/testsuite/g++.dg/opt/static2.C
new file mode 100644
index 00000000000..e2ecd13c572
--- /dev/null
+++ b/gcc/testsuite/g++.dg/opt/static2.C
@@ -0,0 +1,13 @@
+// Origin: reichelt@igpm.rwth-aachen.de
+// PR 5571
+// { dg-options "-O2" }
+
+template <class T> struct A {};
+
+struct B
+{
+ static A<int> a;
+ void f() { a; }
+};
+
+A<int> B::a = A<int>();