This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[GOOGLE] Fix new tests
- From: Teresa Johnson <tejohnson at google dot com>
- To: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>, David Li <davidxl at google dot com>
- Date: Wed, 24 Sep 2014 06:20:20 -0700
- Subject: [GOOGLE] Fix new tests
- Authentication-results: sourceware.org; auth=none
The new tests added for -mpatch-functions-for-instrumentation did not
correctly restrict themselves to x86_64 since tree-prof.exp doesn't
support dg-do. Work around this by using target selectors on the
dg-options. I apply the -mpatch and related options only if it is
x86_64, otherwise it simply does splitting.
Ok for google branches?
Teresa
2014-09-24 Teresa Johnson <tejohnson@google.com>
* testsuite/gcc.dg/tree-prof/cold_partition_patch.c:
* testsuite/g++.dg/tree-prof/partition_patch.C:
Index: testsuite/gcc.dg/tree-prof/cold_partition_patch.c
===================================================================
--- testsuite/gcc.dg/tree-prof/cold_partition_patch.c (revision 215525)
+++ testsuite/gcc.dg/tree-prof/cold_partition_patch.c (working copy)
@@ -1,8 +1,7 @@
/* Check if patching works with function splitting. */
-/* { dg-do compile { target x86_64-*-* } } */
/* { dg-require-effective-target freorder } */
-/* { dg-options "-O2 -freorder-blocks-and-partition -save-temps
-mpatch-functions-for-instrumentation -fno-optimize-sibling-calls " }
*/
-
+/* { dg-options "-O2 -freorder-blocks-and-partition -save-temps " {
target { ! x86_64-*-* } } }
+/* { dg-options "-O2 -freorder-blocks-and-partition -save-temps
-mpatch-functions-for-instrumentation -fno-optimize-sibling-calls " {
target x86_64-*-* } } */
#define SIZE 10000
const char *sarr[SIZE];
Index: testsuite/g++.dg/tree-prof/partition_patch.C
===================================================================
--- testsuite/g++.dg/tree-prof/partition_patch.C (revision 215525)
+++ testsuite/g++.dg/tree-prof/partition_patch.C (working copy)
@@ -1,7 +1,7 @@
// Check if patching works with function splitting.
-// { dg-do compile { target x86_64-*-* } }
// { dg-require-effective-target freorder }
-// { dg-options "-O2 -fnon-call-exceptions
-freorder-blocks-and-partition -mpatch-functions-for-instrumentation
-fno-optimize-sibling-calls " }
+// { dg-options "-O2 -fnon-call-exceptions
-freorder-blocks-and-partition " { target { ! x86_64-*-* } } }
+// { dg-options "-O2 -fnon-call-exceptions
-freorder-blocks-and-partition -mpatch-functions-for-instrumentation
-fno-optimize-sibling-calls " { target x86_64-*-* } }
int k;
--
Teresa Johnson | Software Engineer | tejohnson@google.com | 408-460-2413