[ was: Re: [patch] Run testsuite/libgomp.c++/c++.exp at -O2 by default ]
On 30/06/15 14:07, Jakub Jelinek wrote:
On Mon, Jun 15, 2015 at 06:36:17PM +0200, Tom de Vries wrote:
Hi,
this patch:
- sets DEFAULT_CFLAGS to -O2, if not set otherwise
(similar to what is done in c.exp)
- removes superfluous dg-options "-O2" settings.
- removes superfluous dg-options "-fopenmp" settings.
- uses dg-additional-options for -std=<standard> settings
Tested on x86_64.
OK for trunk?
Ok, thanks.
I've also committed this patch, as obvious. It does the same, but for
libgomp.oacc-c++/c++.exp (which was based on libgomp.c++/c++.exp).
Thanks,
- Tom
Run testsuite/libgomp.oacc-c++/c++.exp at -O2 by default
2015-06-30 Tom de Vries <t...@codesourcery.com>
* testsuite/libgomp.oacc-c++/c++.exp: Set DEFAULT_CFLAGS to -O2 if not
already set. Use DEFAULT_CFLAGS in dg-runtest.
* testsuite/libgomp.oacc-c-c++-common/collapse-3.c: Remove dg-options
"-O2".
---
libgomp/testsuite/libgomp.oacc-c++/c++.exp | 7 ++++++-
libgomp/testsuite/libgomp.oacc-c-c++-common/collapse-3.c | 1 -
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/libgomp/testsuite/libgomp.oacc-c++/c++.exp b/libgomp/testsuite/libgomp.oacc-c++/c++.exp
index f486f9b..80d1359 100644
--- a/libgomp/testsuite/libgomp.oacc-c++/c++.exp
+++ b/libgomp/testsuite/libgomp.oacc-c++/c++.exp
@@ -13,6 +13,11 @@ if [info exists lang_include_flags] then {
unset lang_include_flags
}
+# If a testcase doesn't have special options, use these.
+if ![info exists DEFAULT_CFLAGS] then {
+ set DEFAULT_CFLAGS "-O2"
+}
+
# Initialize dg.
dg-init
@@ -96,7 +101,7 @@ if { $lang_test_file_found } {
setenv ACC_DEVICE_TYPE $offload_target_openacc
- dg-runtest $tests "$tagopt" $libstdcxx_includes
+ dg-runtest $tests "$tagopt" "$libstdcxx_includes $DEFAULT_CFLAGS"
}
}
diff --git a/libgomp/testsuite/libgomp.oacc-c-c++-common/collapse-3.c b/libgomp/testsuite/libgomp.oacc-c-c++-common/collapse-3.c
index a5be728..6800428 100644
--- a/libgomp/testsuite/libgomp.oacc-c-c++-common/collapse-3.c
+++ b/libgomp/testsuite/libgomp.oacc-c-c++-common/collapse-3.c
@@ -1,5 +1,4 @@
/* { dg-do run } */
-/* { dg-options "-O2" } */
#include <string.h>
#include <stdlib.h>
--
1.9.1