Patchwork [testsuite] Cap VLEN in gcc.c-torture/execute/20011008-3.c

login
register
mail settings
Submitter Eric Botcazou
Date March 25, 2013, 11:27 a.m.
Message ID <2782727.lA7ele4llr@polaris>
Download mbox | patch
Permalink /patch/230640/
State New
Headers show

Comments

Eric Botcazou - March 25, 2013, 11:27 a.m.
Hi,

gcc.c-torture/execute/20011008-3.c has these lines:

#ifndef STACK_SIZE
#define	VLEN	1235
#else
#define VLEN (STACK_SIZE/10)
#endif

which means that VLEN is _not_ capped if STACK_SIZE is defined, which goes 
against the very purpose of STACK_SIZE in the testing framework.

Fixed thusly, tested on x86_64-suse-linux, OK for the mainline?


2013-03-25  Eric Botcazou  <ebotcazou@adacore.com>

	* gcc.c-torture/execute/20011008-3.c: Cap VLEN with STACK_SIZE too.
Mike Stump - March 25, 2013, 6:29 p.m.
On Mar 25, 2013, at 4:27 AM, Eric Botcazou <ebotcazou@adacore.com> wrote:
> gcc.c-torture/execute/20011008-3.c has these lines:
> 
> #ifndef STACK_SIZE
> #define	VLEN	1235
> #else
> #define VLEN (STACK_SIZE/10)
> #endif
> 
> which means that VLEN is _not_ capped if STACK_SIZE is defined, which goes 
> against the very purpose of STACK_SIZE in the testing framework.
> 
> Fixed thusly, tested on x86_64-suse-linux, OK for the mainline?

Ok.

> 2013-03-25  Eric Botcazou  <ebotcazou@adacore.com>
> 
> 	* gcc.c-torture/execute/20011008-3.c: Cap VLEN with STACK_SIZE too.

Patch

Index: gcc.c-torture/execute/20011008-3.c
===================================================================
--- gcc.c-torture/execute/20011008-3.c	(revision 196816)
+++ gcc.c-torture/execute/20011008-3.c	(working copy)
@@ -81,10 +81,10 @@  __db_txnlist_lsnadd(int val, DB_TXNLIST
    return val;
 }
 
-#ifndef STACK_SIZE
-#define	VLEN	1235
-#else
+#if defined (STACK_SIZE) && STACK_SIZE < 12350
 #define VLEN (STACK_SIZE/10)
+#else
+#define VLEN 1235
 #endif
 
 int main (void)