[ was: Re: [PATCH, testsuite] Add effective target stack_size ]
On 06/21/2017 03:19 PM, Jakub Jelinek wrote:
On Fri, Jun 09, 2017 at 04:24:30PM +0200, Tom de Vries wrote:
* gcc.dg/tree-prof/comp-goto-1.c: Same.
* gcc.dg/tree-prof/pr44777.c: Same.
--- a/gcc/testsuite/gcc.dg/tree-prof/comp-goto-1.c
+++ b/gcc/testsuite/gcc.dg/tree-prof/comp-goto-1.c
@@ -1,6 +1,8 @@
/* { dg-require-effective-target freorder } */
/* { dg-require-effective-target label_values } */
/* { dg-options "-O2 -freorder-blocks-and-partition" } */
+/* { dg-additional-options "-DSTACK_SIZE=[dg-effective-target-value
stack_size]" { target { stack_size } } } */
+
#include <stdlib.h>
#if (!defined(STACK_SIZE) || STACK_SIZE >= 4000) && __INT_MAX__ >= 2147483647
diff --git a/gcc/testsuite/gcc.dg/tree-prof/pr44777.c
b/gcc/testsuite/gcc.dg/tree-prof/pr44777.c
index 4074b75..1249b5b 100644
--- a/gcc/testsuite/gcc.dg/tree-prof/pr44777.c
+++ b/gcc/testsuite/gcc.dg/tree-prof/pr44777.c
@@ -2,6 +2,8 @@
/* { dg-require-effective-target label_values } */
/* { dg-require-effective-target trampolines } */
/* { dg-options "-O0" } */
+/* { dg-additional-options "-DSTACK_SIZE=[dg-effective-target-value
stack_size]" { target { stack_size } } } */
+
/* A variant of gcc.c-torture/execute/comp-goto-2.c. */
extern void abort (void);
I'm now seeing
WARNING: profopt.exp does not support dg-add-options
WARNING: profopt.exp does not support dg-add-options
so the above doesn't look correct.
Thanks for pointing that out. I've double-checked, and the warnings did
appear for me in the testlogs, but my automated test-comparison
reporting did not pick up on that, I'll have to fix that.
Fixed the warnings by adding dg-add-options support in profopt-get-options.
Tested both test-cases on x86_64.
Tested both test-cases on x86_64 with effective target stack_size set to
0, and verified that -DSTACK_SIZE=0 was passed.
Committed as obvious.
Thanks,
- Tom
Support dg-add-options in profopt.exp
2017-06-21 Tom de Vries <t...@codesourcery.com>
* lib/profopt.exp (profopt-get-options): Support dg-add-options.
---
gcc/testsuite/lib/profopt.exp | 1 +
1 file changed, 1 insertion(+)
diff --git a/gcc/testsuite/lib/profopt.exp b/gcc/testsuite/lib/profopt.exp
index 6519c44..0ea8e7a 100644
--- a/gcc/testsuite/lib/profopt.exp
+++ b/gcc/testsuite/lib/profopt.exp
@@ -249,6 +249,7 @@ proc profopt-get-options { src } {
set cmd [lindex $op 0]
if { ![string compare "dg-options" $cmd] \
|| ![string compare "dg-additional-options" $cmd] \
+ || ![string compare "dg-add-options" $cmd] \
|| ![string compare "dg-skip-if" $cmd] \
|| ![string compare "dg-final-generate" $cmd] \
|| ![string compare "dg-final-use" $cmd] \