* elf64-ppc.c (dec_dynrel_count): Don't error when elf_gc_sweep_symbol
[external/binutils.git] / gold / testsuite / ver_test_main.cc
index 9eb6ccd..f8a7b75 100644 (file)
@@ -1,7 +1,7 @@
-// basic_test.cc -- a test case for gold
+// ver_test_main.cc -- a test case for gold
 
-// Copyright 2007 Free Software Foundation, Inc.
-// Written by Ian Lance Taylor <iant@google.com>.
+// Copyright 2007, 2008 Free Software Foundation, Inc.
+// Written by Cary Coutant <ccoutant@google.com>.
 
 // This file is part of gold.
 
@@ -30,6 +30,7 @@ main()
   assert(t1());
   assert(t2());
   assert(t3());
+  assert(t4());
   return 0;
 }
 
@@ -52,3 +53,22 @@ t3()
   TRACE
   return t3_2() == 12;
 }
+
+// Call a function in a shared library that calls a function which is
+// defined in the main program and defined with a default version in
+// the shared library.  The symbol in the main program should override
+// even though it doesn't have a version.
+
+bool
+t4()
+{
+  TRACE
+  return t4_2() == 42;
+}
+
+int
+t4_2a()
+{
+  TRACE
+  return 42;
+}