]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - gold/testsuite/two_file_test_2.cc
ChangeLog rotatation and copyright year update
[thirdparty/binutils-gdb.git] / gold / testsuite / two_file_test_2.cc
index 806409e771f4f9be655659392ba16821a5217690..ab56b217794e53adcd17d1d2c0d1672d84a69c5b 100644 (file)
@@ -1,6 +1,6 @@
 // two_file_test_2.cc -- a two file test case for gold, file 2 of 2
 
-// Copyright 2006, 2007 Free Software Foundation, Inc.
+// Copyright (C) 2006-2015 Free Software Foundation, Inc.
 // Written by Ian Lance Taylor <iant@google.com>.
 
 // This file is part of gold.
@@ -33,6 +33,12 @@ t1_2()
   return 123;
 }
 
+bool
+t1a()
+{
+  return t1_2() == 123;
+}
+
 // 2  Code in file 1 refers to global data in file 2.
 
 int v2 = 456;
@@ -108,3 +114,32 @@ f15()
 {
   return TEST_WIDE_STRING_CONSTANT;
 }
+
+// 17 File 1 checks array of string constants defined in file 2.
+
+const char* t17data[T17_COUNT] =
+{
+  "a", "b", "c", "d", "e"
+};
+
+// 18 File 1 checks string constants referenced directly in file 2.
+
+const char*
+f18(int i)
+{
+  switch (i)
+    {
+    case 0:
+      return "a";
+    case 1:
+      return "b";
+    case 2:
+      return "c";
+    case 3:
+      return "d";
+    case 4:
+      return "e";
+    default:
+      return 0;
+    }
+}