aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/g++.old-deja/g++.pt/repo2.C22
1 files changed, 22 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/repo2.C b/gcc/testsuite/g++.old-deja/g++.pt/repo2.C
new file mode 100644
index 0000000..4067d0c
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.pt/repo2.C
@@ -0,0 +1,22 @@
+// Test that collect2 isn't confused by GNU ld's "In function `foo':" message.
+// Contributed by Jason Merrill <jason@cygnus.com>
+
+// Build then link:
+// Special g++ Options: -frepo
+
+template <class T>
+T f (T t)
+{
+ return t;
+}
+
+template <class T>
+T g (T t)
+{
+ return f (t);
+}
+
+int main ()
+{
+ int i = g (42);
+}