lto.exp: Add support for C/C++ mix language testing.
authorMike Stump <mikestump@comcast.net>
Sat, 19 Oct 2013 19:13:15 +0000 (19:13 +0000)
committerMike Stump <mrs@gcc.gnu.org>
Sat, 19 Oct 2013 19:13:15 +0000 (19:13 +0000)
* g++.dg/lto/lto.exp: Add support for C/C++ mix language testing.

* gcc.dg/lto/pr54625-1_0.c: Move from here...
* g++.dg/lto/pr54625-1_0.c: ... to here.
* gcc.dg/lto/pr54625-1_1.C: Likewise.
* g++.dg/lto/pr54625-1_1.C: Likewise.
* gcc.dg/lto/pr54625-2_0.c: Likewise.
* g++.dg/lto/pr54625-2_0.c: Likewise.
* gcc.dg/lto/pr54625-2_1.C: Likewise.
* g++.dg/lto/pr54625-2_1.C: Likewise.

From-SVN: r203862

gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/lto/lto.exp
gcc/testsuite/g++.dg/lto/pr54625-1_0.c [new file with mode: 0644]
gcc/testsuite/g++.dg/lto/pr54625-1_1.C [new file with mode: 0644]
gcc/testsuite/g++.dg/lto/pr54625-2_0.c [new file with mode: 0644]
gcc/testsuite/g++.dg/lto/pr54625-2_1.C [new file with mode: 0644]
gcc/testsuite/gcc.dg/lto/pr54625-1_0.c [deleted file]
gcc/testsuite/gcc.dg/lto/pr54625-1_1.C [deleted file]
gcc/testsuite/gcc.dg/lto/pr54625-2_0.c [deleted file]
gcc/testsuite/gcc.dg/lto/pr54625-2_1.C [deleted file]

index 0704c8e2fea6e7cf47e935a8534f303c6b05cd12..4df46ae4a2b18a1d04ce4ebaf8f8572e21677aa4 100644 (file)
@@ -1,3 +1,16 @@
+2013-10-19  Mike Stump  <mikestump@comcast.net>
+
+       * g++.dg/lto/lto.exp: Add support for C/C++ mix language testing.
+
+       * gcc.dg/lto/pr54625-1_0.c: Move from here...
+       * g++.dg/lto/pr54625-1_0.c: ... to here.
+       * gcc.dg/lto/pr54625-1_1.C: Likewise.
+       * g++.dg/lto/pr54625-1_1.C: Likewise.
+       * gcc.dg/lto/pr54625-2_0.c: Likewise.
+       * g++.dg/lto/pr54625-2_0.c: Likewise.
+       * gcc.dg/lto/pr54625-2_1.C: Likewise.
+       * g++.dg/lto/pr54625-2_1.C: Likewise.
+
 2013-10-19  Oleg Endo  <olegendo@gcc.gnu.org>
 
        * gcc.target/sh/pr54089-3.c: Fix test for load of constant 31.
index 29cf3be991d4b664ae07f14a1a32433469be4f64..0c6025dd962190855b556bdc383245e569985099 100644 (file)
@@ -48,7 +48,7 @@ if { ![check_effective_target_lto] } {
 }
 
 # Main loop.
-foreach src [lsort [find $srcdir/$subdir *_0.C]] {
+foreach src [lsort [find $srcdir/$subdir *_0.\[cC\]]] {
     # If we're only testing specific files and this isn't one of them, skip it.
     if ![runtest_file_p $runtests $src] then {
        continue
diff --git a/gcc/testsuite/g++.dg/lto/pr54625-1_0.c b/gcc/testsuite/g++.dg/lto/pr54625-1_0.c
new file mode 100644 (file)
index 0000000..5ab90dd
--- /dev/null
@@ -0,0 +1,10 @@
+/* { dg-lto-do link } */
+/* { dg-extra-ld-options { -r -nostdlib } } */
+
+float a;
+double sin ();
+speex_resampler_init_frac ()
+{
+  a = sin (0);
+}
+
diff --git a/gcc/testsuite/g++.dg/lto/pr54625-1_1.C b/gcc/testsuite/g++.dg/lto/pr54625-1_1.C
new file mode 100644 (file)
index 0000000..2d0d5bf
--- /dev/null
@@ -0,0 +1,19 @@
+extern "C" double sin (double);
+typedef double UnaryFunType (double);
+class A
+{
+public:
+  int hash ();
+  double lookup (UnaryFunType p1)
+    {
+      int a = hash ();
+      if (p1)
+       return 0;
+    }
+};
+A b;
+void
+math_sin_impl ()
+{
+  b.lookup (sin);
+}
diff --git a/gcc/testsuite/g++.dg/lto/pr54625-2_0.c b/gcc/testsuite/g++.dg/lto/pr54625-2_0.c
new file mode 100644 (file)
index 0000000..6511ba5
--- /dev/null
@@ -0,0 +1,9 @@
+/* { dg-lto-do link } */
+/* { dg-extra-ld-options { -r -nostdlib } } */
+
+float a;
+double sin ();
+update_filter ()
+{
+  a = sin (0);
+}
diff --git a/gcc/testsuite/g++.dg/lto/pr54625-2_1.C b/gcc/testsuite/g++.dg/lto/pr54625-2_1.C
new file mode 100644 (file)
index 0000000..09c365d
--- /dev/null
@@ -0,0 +1,24 @@
+extern "C" double sin (double);
+typedef double (*UnaryFunType) (double);
+class A
+{
+public:
+  int hash ();
+  void lookup (UnaryFunType p1)
+    {
+      int a = hash ();
+      p1 (0);
+    }
+};
+A b, c;
+void
+math_sin_impl ()
+{
+  b.lookup (sin);
+}
+
+void
+js_math_sqrt ()
+{
+  c.lookup (0);
+}
diff --git a/gcc/testsuite/gcc.dg/lto/pr54625-1_0.c b/gcc/testsuite/gcc.dg/lto/pr54625-1_0.c
deleted file mode 100644 (file)
index 5ab90dd..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-/* { dg-lto-do link } */
-/* { dg-extra-ld-options { -r -nostdlib } } */
-
-float a;
-double sin ();
-speex_resampler_init_frac ()
-{
-  a = sin (0);
-}
-
diff --git a/gcc/testsuite/gcc.dg/lto/pr54625-1_1.C b/gcc/testsuite/gcc.dg/lto/pr54625-1_1.C
deleted file mode 100644 (file)
index 2d0d5bf..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-extern "C" double sin (double);
-typedef double UnaryFunType (double);
-class A
-{
-public:
-  int hash ();
-  double lookup (UnaryFunType p1)
-    {
-      int a = hash ();
-      if (p1)
-       return 0;
-    }
-};
-A b;
-void
-math_sin_impl ()
-{
-  b.lookup (sin);
-}
diff --git a/gcc/testsuite/gcc.dg/lto/pr54625-2_0.c b/gcc/testsuite/gcc.dg/lto/pr54625-2_0.c
deleted file mode 100644 (file)
index 6511ba5..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-/* { dg-lto-do link } */
-/* { dg-extra-ld-options { -r -nostdlib } } */
-
-float a;
-double sin ();
-update_filter ()
-{
-  a = sin (0);
-}
diff --git a/gcc/testsuite/gcc.dg/lto/pr54625-2_1.C b/gcc/testsuite/gcc.dg/lto/pr54625-2_1.C
deleted file mode 100644 (file)
index 09c365d..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-extern "C" double sin (double);
-typedef double (*UnaryFunType) (double);
-class A
-{
-public:
-  int hash ();
-  void lookup (UnaryFunType p1)
-    {
-      int a = hash ();
-      p1 (0);
-    }
-};
-A b, c;
-void
-math_sin_impl ()
-{
-  b.lookup (sin);
-}
-
-void
-js_math_sqrt ()
-{
-  c.lookup (0);
-}