summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.pt/local3.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.pt/local3.C')
-rw-r--r--gcc/testsuite/g++.old-deja/g++.pt/local3.C27
1 files changed, 27 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/local3.C b/gcc/testsuite/g++.old-deja/g++.pt/local3.C
new file mode 100644
index 000000000..6c0fe4573
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.pt/local3.C
@@ -0,0 +1,27 @@
+// { dg-do run }
+extern "C" void abort();
+
+template <class T>
+void f(T)
+{
+ int j;
+
+ j = 6;
+
+ struct S {
+ int i;
+ };
+
+ S s;
+
+ s.i = j;
+
+ if (s.i != 6)
+ abort();
+}
+
+
+int main()
+{
+ f(7);
+}