summaryrefslogtreecommitdiffstats
path: root/test/FrontendC++/2004-06-08-LateTemplateInstantiation.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/FrontendC++/2004-06-08-LateTemplateInstantiation.cpp')
-rw-r--r--test/FrontendC++/2004-06-08-LateTemplateInstantiation.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/FrontendC++/2004-06-08-LateTemplateInstantiation.cpp b/test/FrontendC++/2004-06-08-LateTemplateInstantiation.cpp
new file mode 100644
index 0000000..16d8e5e
--- /dev/null
+++ b/test/FrontendC++/2004-06-08-LateTemplateInstantiation.cpp
@@ -0,0 +1,19 @@
+// RUN: %llvmgxx -S %s -o - | llvm-as -f -o /dev/null
+
+
+
+template<typename Ty>
+struct normal_iterator {
+ int FIELD;
+};
+
+void foo(normal_iterator<int>);
+normal_iterator<int> baz();
+
+void bar() {
+ foo(baz());
+}
+
+void *bar2() {
+ return (void*)foo;
+}