diff mbox

RE: Testsuite / Cilk Plus: Include library path in compile flags in gcc.dg/cilk-plus/cilk-plus.exp

Message ID BF230D13CA30DD48930C31D4099330003A49B1E8@FMSMSX101.amr.corp.intel.com
State New
Headers show

Commit Message

Iyer, Balaji V Nov. 5, 2013, 5:04 p.m. UTC
Hello Jakub et al.,
      I went through all your emails and the patch above will fix the following issues:

1. Bug in the fib<>.c test case where it should recursively call fib_serial instead of fib() in the serial case.
2. Remove duplicate or unwanted test case flags (e.g. there were cases were -g and "-O0 -g" were both tested, so I took out one of them)
3. Called builtin_abort() instead of returning a non-zero return value for main in the test cases.
4. Reduce the iteration of fib -- the main reason why I had a larger iteration is that we wanted to force a steal, but I already have a test case that will do that. So, if there is any issue in that logic, that code should fail.

Also, with all these changes, make check-gcc RUNTESTFLAGS='--target_board=unix/-m32 cilk-plus.exp' and make check-gcc RUNTESTFLAGS='--target_board=unix cilk-plus.exp' runs are significantly faster.

Here are the ChangeLog entries: 

+2013-11-05  Balaji V. Iyer  <balaji.v.iyer@intel.com>
+
+       * c-c++-common/cilk-plus/CK/fib.c: Reduced the iteration from
+       40 to 30.  Replaced iteration variable with a #define.  Instead of
+       returning non-zero value for error, called __builtin_abort ().  Fixed
+       a bug of calling fib_serial in serial case instead of fib.
+       * c-c++-common/cilk-plus/CK/fib_init_expr_xy.c: Likewise.
+       * c-c++-common/cilk-plus/CK/fib_no_return.c: Likewise.
+       * c-c++-common/cilk-plus/CK/fib_no_sync.c: Likewise.
+       * gcc.dg/cilk-plus/cilk-plus.exp: Removed duplicate/un-necessary
+       compiler flag testing.
+

Is this Ok to check in?

Thanks,

Balaji V. Iyer.

> -----Original Message-----
> From: gcc-patches-owner@gcc.gnu.org [mailto:gcc-patches-
> owner@gcc.gnu.org] On Behalf Of Jakub Jelinek
> Sent: Tuesday, November 5, 2013 6:33 AM
> To: Iyer, Balaji V
> Cc: Iain Sandoe; Joseph S. Myers; Tobias Burnus; gcc patches
> Subject: Re: Testsuite / Cilk Plus: Include library path in compile flags in
> gcc.dg/cilk-plus/cilk-plus.exp
> 
> On Tue, Nov 05, 2013 at 12:21:04PM +0100, Jakub Jelinek wrote:
> > Tests that many seconds or more on fast machines, especially if you
> > run them
> > 25 times, are simply not appropriate for gcc testsuite, at least not
> > by default.  We have run_expensive_tests (from
> GCC_RUN_EXPENSIVE_TESTS
> > in environment), which can be used say for:
> > /* { dg-additional-options "-DEXPENSIVE" { target run_expensive_tests
> > } } */ or // { dg-additional-options "-DASAN_AVOID_EXPENSIVE_TESTS=1"
> > { target { ! run_expensive_tests } } } or
> > /* { dg-skip-if "" { ! run_expensive_tests } { "*" } { "-O2" } } */
> > (just grep for it), but still it shouldn't be prohibitively slow.
> > Remember what is slow on fast machines might turn into days on really
> > slow machines.  Say, if all you are looking for is look for library
> > synchronization issues, I guess all optimization levels still result
> > in similar pattern of library calls, so even for run_expensive_tests
> > you could use higher iteration count for a single optimization level
> > (say -O2) and for all others just use smaller iteration count.
> 
> Oh, another thing, runtime tests should abort () or __builtin_abort () on
> failure, rather then just exit with non-zero status.
> 
> Also, I wonder about the fib_* tests, fib_serial calls fib rather than fib_serial,
> so effectively the only difference between calling fib_serial and fib is just the
> outermost iteration.  Also, are you really sure you have to call fib with all
> values from 0 up to 40?  Isn't it enough to just call fib (40) once and compare
> that with precomputed fib (40) number?
> Because, when a single test takes about 2 minutes to run, it is really too
> much, and very much unnecessarily so.
> 
> 	Jakub

Comments

Jakub Jelinek Nov. 5, 2013, 5:20 p.m. UTC | #1
On Tue, Nov 05, 2013 at 05:04:21PM +0000, Iyer, Balaji V wrote:
> --- gcc.dg/cilk-plus/cilk-plus.exp	(revision 204396)
> +++ gcc.dg/cilk-plus/cilk-plus.exp	(working copy)
>  dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/cilk-plus/CK/*.c]] " -fcilkplus $ALWAYS_CFLAGS " " "
> -dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/cilk-plus/CK/*.c]] " -O0 -fcilkplus $ALWAYS_CFLAGS" " "
>  dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/cilk-plus/CK/*.c]] " -O1 -fcilkplus $ALWAYS_CFLAGS" " "
> -dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/cilk-plus/CK/*.c]] " -O2 -ftree-vectorize -fcilkplus $ALWAYS_CFLAGS" " "
> +dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/cilk-plus/CK/*.c]] " -O2 -fcilkplus $ALWAYS_CFLAGS" " "
>  dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/cilk-plus/CK/*.c]] " -O3 -fcilkplus $ALWAYS_CFLAGS" " "
>  dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/cilk-plus/CK/*.c]] " -g -fcilkplus $ALWAYS_CFLAGS" " "
> -dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/cilk-plus/CK/*.c]] " -g -O0 -fcilkplus $ALWAYS_CFLAGS" " "
> -dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/cilk-plus/CK/*.c]] " -g -O1 -fcilkplus $ALWAYS_CFLAGS" " "
>  dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/cilk-plus/CK/*.c]] " -g -O2 -ftree-vectorize -fcilkplus $ALWAYS_CFLAGS" " "
> -dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/cilk-plus/CK/*.c]] " -g -O3 -fcilkplus $ALWAYS_CFLAGS"  " "
> -dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/cilk-plus/CK/*.c]] " -O3 -ftree-vectorize -fcilkplus -g $ALWAYS_CFLAGS" " "
>  dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/cilk-plus/CK/*.c]] " -fcilkplus -std=c99 $ALWAYS_CFLAGS" " "
> -dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/cilk-plus/CK/*.c]] " -fcilkplus -O0 -std=c99 $ALWAYS_CFLAGS" " "
> -dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/cilk-plus/CK/*.c]] " -fcilkplus -O1 -std=c99 $ALWAYS_CFLAGS" " "
>  dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/cilk-plus/CK/*.c]] " -fcilkplus -O2 -ftree-vectorize -std=c99 $ALWAYS_CFLAGS" " "
>  dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/cilk-plus/CK/*.c]] " -fcilkplus -O3 -std=c99 $ALWAYS_CFLAGS"  " "
>  dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/cilk-plus/CK/*.c]] " -fcilkplus -g -std=c99 $ALWAYS_CFLAGS" " "
> -dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/cilk-plus/CK/*.c]] " -fcilkplus -g -O0 -std=c99 $ALWAYS_CFLAGS" " "
> -dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/cilk-plus/CK/*.c]] " -fcilkplus -g -O1 -std=c99 $ALWAYS_CFLAGS" " "
> -dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/cilk-plus/CK/*.c]] " -fcilkplus -g -O2 -ftree-vectorize -std=c99 $ALWAYS_CFLAGS" " "
> -dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/cilk-plus/CK/*.c]] " -fcilkplus -g -O3 -std=c99 $ALWAYS_CFLAGS" " "
> -dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/cilk-plus/CK/*.c]] " -O3 -ftree-vectorize -std=c99 -g -fcilkplus $ALWAYS_CFLAGS" " "
> -dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/cilk-plus/CK/*.c]] " -O0 -flto -g -fcilkplus $ALWAYS_CFLAGS" " "
> -dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/cilk-plus/CK/*.c]] " -O2 -flto -g -fcilkplus $ALWAYS_CFLAGS" " "
> +dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/cilk-plus/CK/*.c]] " -fcilkplus -g -O2 -std=c99 $ALWAYS_CFLAGS" " "
>  dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/cilk-plus/CK/*.c]] " -O3  -flto -g -fcilkplus $ALWAYS_CFLAGS" " "

That is still 12 torture iterations, which is IMHO just too much.  Why do
you think testing would be insufficient say for:
 dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/cilk-plus/CK/*.c]] " -g -fcilkplus $ALWAYS_CFLAGS " " "
 dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/cilk-plus/CK/*.c]] " -O1 -fcilkplus $ALWAYS_CFLAGS" " "
 dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/cilk-plus/CK/*.c]] " -O2 -std=c99 -fcilkplus $ALWAYS_CFLAGS" " "
 dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/cilk-plus/CK/*.c]] " -O2 -ftree-vectorize -fcilkplus $ALWAYS_CFLAGS" " "
 dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/cilk-plus/CK/*.c]] " -O3 -g -fcilkplus $ALWAYS_CFLAGS" " "
 dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/cilk-plus/CK/*.c]] " -O3 -flto -g -fcilkplus $ALWAYS_CFLAGS" " "
only?  Then both -std=c99 and non-std=c99 is tested, -g and -g0, and the
major optimization levels plus -O2 -ftree-vectorize.

> --- c-c++-common/cilk-plus/CK/fib.c	(revision 204396)
> +++ c-c++-common/cilk-plus/CK/fib.c	(working copy)
> @@ -9,27 +9,31 @@
>  int fib        (int);
>  int fib_serial (int);
>  
> +#define FIB_ITERATION  30

As I said, if you want to use FIB_ITERATION 40 for the
GCC_RUN_EXPENSIVE_TESTS=1, this would be a matter of:
/* { dg-additional-options "-DFIB_ITERATION=40" { target run_expensive_tests } } */
#ifndef FIB_ITERATION
#define FIB_ITERATION 30
#endif

> +  for (ii = 0; ii <= 30; ii++)

You aren't using FIB_ITERATION above (etc.).

>      {
>        fib_result[ii]        = fib (ii);

What is the point of testing separately fib (0), fib (1), up to fib (30),
when fib (30) already tests all of them (some of them many times)?

>        fib_serial_result[ii] = fib_serial (ii);

And, do you really need to test this at runtime?  If you want to do it only
to verify the fib (FIB_ITERATION) result, then at least do:
fib_serial_result[0] = 0;
fib_serial_result[1] = 1;
for (ii = 2; ii <= FIB_ITERATION; ii++)
  fib_serial_result[ii] = fib_serial_result[ii - 2] + fib_serial_result[ii - 1];
if (fib (FIB_ITERATION) != fib_serial_result[FIB_ITERATION])
  __builtin_abort ();
(still not fastest, but at least not soo slow).

	Jakub
Jeff Law Nov. 5, 2013, 5:23 p.m. UTC | #2
On 11/05/13 10:04, Iyer, Balaji V wrote:
> Hello Jakub et al.,
>        I went through all your emails and the patch above will fix the following issues:
>
> 1. Bug in the fib<>.c test case where it should recursively call fib_serial instead of fib() in the serial case.
> 2. Remove duplicate or unwanted test case flags (e.g. there were cases were -g and "-O0 -g" were both tested, so I took out one of them)
> 3. Called builtin_abort() instead of returning a non-zero return value for main in the test cases.
> 4. Reduce the iteration of fib -- the main reason why I had a larger iteration is that we wanted to force a steal, but I already have a test case that will do that. So, if there is any issue in that logic, that code should fail.
>
> Also, with all these changes, make check-gcc RUNTESTFLAGS='--target_board=unix/-m32 cilk-plus.exp' and make check-gcc RUNTESTFLAGS='--target_board=unix cilk-plus.exp' runs are significantly faster.
>
> Here are the ChangeLog entries:
>
> +2013-11-05  Balaji V. Iyer  <balaji.v.iyer@intel.com>
> +
> +       * c-c++-common/cilk-plus/CK/fib.c: Reduced the iteration from
> +       40 to 30.  Replaced iteration variable with a #define.  Instead of
> +       returning non-zero value for error, called __builtin_abort ().  Fixed
> +       a bug of calling fib_serial in serial case instead of fib.
> +       * c-c++-common/cilk-plus/CK/fib_init_expr_xy.c: Likewise.
> +       * c-c++-common/cilk-plus/CK/fib_no_return.c: Likewise.
> +       * c-c++-common/cilk-plus/CK/fib_no_sync.c: Likewise.
> +       * gcc.dg/cilk-plus/cilk-plus.exp: Removed duplicate/un-necessary
> +       compiler flag testing.
> +
>
> Is this Ok to check in?
Yes.

I do wonder if this would be better in the dg-torture framework.  But 
you can investigate that as a follow-up.

jeff
diff mbox

Patch

Index: gcc.dg/cilk-plus/cilk-plus.exp
===================================================================
--- gcc.dg/cilk-plus/cilk-plus.exp	(revision 204396)
+++ gcc.dg/cilk-plus/cilk-plus.exp	(working copy)
@@ -33,52 +33,27 @@ 
 
 dg-init
 dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/cilk-plus/AN/*.c]] " -fcilkplus" " "
-dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/cilk-plus/AN/*.c]] " -O0 -fcilkplus" " "
 dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/cilk-plus/AN/*.c]] " -O1 -fcilkplus" " "
-dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/cilk-plus/AN/*.c]] " -O2 -ftree-vectorize -fcilkplus" " "
+dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/cilk-plus/AN/*.c]] " -O2 -fcilkplus" " "
 dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/cilk-plus/AN/*.c]] " -O3 -fcilkplus" " "
 dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/cilk-plus/AN/*.c]] " -g -fcilkplus" " "
-dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/cilk-plus/AN/*.c]] " -g -O0 -fcilkplus" " "
-dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/cilk-plus/AN/*.c]] " -g -O1 -fcilkplus" " "
 dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/cilk-plus/AN/*.c]] " -g -O2 -ftree-vectorize -fcilkplus" " "
-dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/cilk-plus/AN/*.c]] " -g -O3 -fcilkplus" " "
-dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/cilk-plus/AN/*.c]] " -O3 -ftree-vectorize -fcilkplus -g" " "
 dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/cilk-plus/AN/*.c]] " -fcilkplus -std=c99" " "
-dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/cilk-plus/AN/*.c]] " -fcilkplus -O0 -std=c99" " "
-dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/cilk-plus/AN/*.c]] " -fcilkplus -O1 -std=c99" " "
-dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/cilk-plus/AN/*.c]] " -fcilkplus -O2 -ftree-vectorize -std=c99" " "
+dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/cilk-plus/AN/*.c]] " -fcilkplus -O2 -std=c99" " "
 dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/cilk-plus/AN/*.c]] " -fcilkplus -O3 -std=c99" " "
-dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/cilk-plus/AN/*.c]] " -fcilkplus -g -std=c99" " "
 dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/cilk-plus/AN/*.c]] " -fcilkplus -g -O0 -std=c99" " "
-dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/cilk-plus/AN/*.c]] " -fcilkplus -g -O1 -std=c99" " "
-dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/cilk-plus/AN/*.c]] " -fcilkplus -g -O2 -ftree-vectorize -std=c99" " "
-dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/cilk-plus/AN/*.c]] " -fcilkplus -g -O3 -std=c99" " "
-dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/cilk-plus/AN/*.c]] " -O3 -ftree-vectorize -std=c99 -g -fcilkplus" " "
 
 
 dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/cilk-plus/CK/*.c]] " -fcilkplus $ALWAYS_CFLAGS " " "
-dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/cilk-plus/CK/*.c]] " -O0 -fcilkplus $ALWAYS_CFLAGS" " "
 dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/cilk-plus/CK/*.c]] " -O1 -fcilkplus $ALWAYS_CFLAGS" " "
-dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/cilk-plus/CK/*.c]] " -O2 -ftree-vectorize -fcilkplus $ALWAYS_CFLAGS" " "
+dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/cilk-plus/CK/*.c]] " -O2 -fcilkplus $ALWAYS_CFLAGS" " "
 dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/cilk-plus/CK/*.c]] " -O3 -fcilkplus $ALWAYS_CFLAGS" " "
 dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/cilk-plus/CK/*.c]] " -g -fcilkplus $ALWAYS_CFLAGS" " "
-dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/cilk-plus/CK/*.c]] " -g -O0 -fcilkplus $ALWAYS_CFLAGS" " "
-dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/cilk-plus/CK/*.c]] " -g -O1 -fcilkplus $ALWAYS_CFLAGS" " "
 dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/cilk-plus/CK/*.c]] " -g -O2 -ftree-vectorize -fcilkplus $ALWAYS_CFLAGS" " "
-dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/cilk-plus/CK/*.c]] " -g -O3 -fcilkplus $ALWAYS_CFLAGS"  " "
-dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/cilk-plus/CK/*.c]] " -O3 -ftree-vectorize -fcilkplus -g $ALWAYS_CFLAGS" " "
 dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/cilk-plus/CK/*.c]] " -fcilkplus -std=c99 $ALWAYS_CFLAGS" " "
-dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/cilk-plus/CK/*.c]] " -fcilkplus -O0 -std=c99 $ALWAYS_CFLAGS" " "
-dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/cilk-plus/CK/*.c]] " -fcilkplus -O1 -std=c99 $ALWAYS_CFLAGS" " "
 dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/cilk-plus/CK/*.c]] " -fcilkplus -O2 -ftree-vectorize -std=c99 $ALWAYS_CFLAGS" " "
 dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/cilk-plus/CK/*.c]] " -fcilkplus -O3 -std=c99 $ALWAYS_CFLAGS"  " "
 dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/cilk-plus/CK/*.c]] " -fcilkplus -g -std=c99 $ALWAYS_CFLAGS" " "
-dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/cilk-plus/CK/*.c]] " -fcilkplus -g -O0 -std=c99 $ALWAYS_CFLAGS" " "
-dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/cilk-plus/CK/*.c]] " -fcilkplus -g -O1 -std=c99 $ALWAYS_CFLAGS" " "
-dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/cilk-plus/CK/*.c]] " -fcilkplus -g -O2 -ftree-vectorize -std=c99 $ALWAYS_CFLAGS" " "
-dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/cilk-plus/CK/*.c]] " -fcilkplus -g -O3 -std=c99 $ALWAYS_CFLAGS" " "
-dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/cilk-plus/CK/*.c]] " -O3 -ftree-vectorize -std=c99 -g -fcilkplus $ALWAYS_CFLAGS" " "
-dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/cilk-plus/CK/*.c]] " -O0 -flto -g -fcilkplus $ALWAYS_CFLAGS" " "
-dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/cilk-plus/CK/*.c]] " -O2 -flto -g -fcilkplus $ALWAYS_CFLAGS" " "
+dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/cilk-plus/CK/*.c]] " -fcilkplus -g -O2 -std=c99 $ALWAYS_CFLAGS" " "
 dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/cilk-plus/CK/*.c]] " -O3  -flto -g -fcilkplus $ALWAYS_CFLAGS" " "
 dg-finish
Index: c-c++-common/cilk-plus/CK/fib.c
===================================================================
--- c-c++-common/cilk-plus/CK/fib.c	(revision 204396)
+++ c-c++-common/cilk-plus/CK/fib.c	(working copy)
@@ -9,27 +9,31 @@ 
 int fib        (int);
 int fib_serial (int);
 
+#define FIB_ITERATION  30
+
 int main(void)
 {
   int ii = 0, error = 0;
-  int fib_result[41], fib_serial_result[41];
+  int fib_result[FIB_ITERATION+1], fib_serial_result[FIB_ITERATION+1];
 #if HAVE_IO
 
-  for (ii = 0; ii <= 40; ii++)
+  for (ii = 0; ii <= 30; ii++)
     printf("fib (%2d) = %10d\n", ii, fib (ii));
 #else
-  for (ii = 0; ii <= 40; ii++)
+  for (ii = 0; ii <= 30; ii++)
     {
       fib_result[ii]        = fib (ii);
       fib_serial_result[ii] = fib_serial (ii);
     }
 
-  for (ii = 0; ii <= 40; ii++)
+  for (ii = 0; ii <= 30; ii++)
     {
       if (fib_result[ii] != fib_serial_result[ii])
 	error = 1;
     }
 #endif
+  if (error != 0)
+    __builtin_abort ();
   return error;
 }
 
@@ -40,8 +44,8 @@ 
     return n;
   else
     {
-      x = fib (n-1);
-      y = fib (n-2);
+      x = fib_serial (n-1);
+      y = fib_serial (n-2);
       return (x+y);
     }
 }
Index: c-c++-common/cilk-plus/CK/fib_init_expr_xy.c
===================================================================
--- c-c++-common/cilk-plus/CK/fib_init_expr_xy.c	(revision 204396)
+++ c-c++-common/cilk-plus/CK/fib_init_expr_xy.c	(working copy)
@@ -9,27 +9,31 @@ 
 int fib        (int);
 int fib_serial (int);
 
+#define FIB_ITERATION 30
+
 int main(void)
 {
   int ii = 0, error = 0;
-  int fib_result[41], fib_serial_result[41];
+  int fib_result[FIB_ITERATION+1], fib_serial_result[FIB_ITERATION+1];
 #if HAVE_IO
 
-  for (ii = 0; ii <= 40; ii++)
+  for (ii = 0; ii <= FIB_ITERATION; ii++)
     printf("fib (%2d) = %10d\n", ii, fib (ii));
 #else
-  for (ii = 0; ii <= 40; ii++)
+  for (ii = 0; ii <= FIB_ITERATION; ii++)
     {
       fib_result[ii]        = fib (ii);
       fib_serial_result[ii] = fib_serial (ii);
     }
 
-  for (ii = 0; ii <= 40; ii++)
+  for (ii = 0; ii <= FIB_ITERATION; ii++)
     {
       if (fib_result[ii] != fib_serial_result[ii])
 	error = 1;
     }
 #endif
+  if (error != 0)
+    __builtin_abort ();
   return error;
 }
 
@@ -40,8 +44,8 @@ 
     return n;
   else
     {
-      x = fib (n-1);
-      y = fib (n-2);
+      x = fib_serial (n-1);
+      y = fib_serial (n-2);
       return (x+y);
     }
 }
Index: c-c++-common/cilk-plus/CK/fib_no_sync.c
===================================================================
--- c-c++-common/cilk-plus/CK/fib_no_sync.c	(revision 204396)
+++ c-c++-common/cilk-plus/CK/fib_no_sync.c	(working copy)
@@ -6,30 +6,34 @@ 
 #include <stdio.h>
 #endif
 
+#define FIB_ITERATION 30
+
 int fib        (int);
 int fib_serial (int);
 
 int main(void)
 {
   int ii = 0, error = 0;
-  int fib_result[41], fib_serial_result[41];
+  int fib_result[FIB_ITERATION+1], fib_serial_result[FIB_ITERATION+1];
 #if HAVE_IO
 
-  for (ii = 0; ii <= 40; ii++)
+  for (ii = 0; ii <= FIB_ITERATION; ii++)
     printf("fib (%2d) = %10d\n", ii, fib (ii));
 #else
-  for (ii = 0; ii <= 40; ii++)
+  for (ii = 0; ii <= FIB_ITERATION; ii++)
     {
       fib_result[ii]        = fib (ii);
       fib_serial_result[ii] = fib_serial (ii);
     }
 
-  for (ii = 0; ii <= 40; ii++)
+  for (ii = 0; ii <= FIB_ITERATION; ii++)
     {
       if (fib_result[ii] != fib_serial_result[ii])
 	error = 1;
     }
 #endif
+  if (error != 0)
+    __builtin_abort ();
   return error;
 }
 
@@ -40,8 +44,8 @@ 
     return n;
   else
     {
-      x = fib (n-1);
-      y = fib (n-2);
+      x = fib_serial (n-1);
+      y = fib_serial (n-2);
       return (x+y);
     }
 }
Index: c-c++-common/cilk-plus/CK/fib_no_return.c
===================================================================
--- c-c++-common/cilk-plus/CK/fib_no_return.c	(revision 204396)
+++ c-c++-common/cilk-plus/CK/fib_no_return.c	(working copy)
@@ -6,34 +6,39 @@ 
 #include <stdio.h>
 #endif
 
+#define FIB_ITERATION 30
+
 void fib        (int *, int);
 int fib_serial (int);
 
 int main(void)
 {
   int ii = 0, error = 0;
-  int fib_result[41], fib_serial_result[41];
+  int fib_result[FIB_ITERATION+1], fib_serial_result[FIB_ITERATION+1];
 
 #if HAVE_IO
-  for (ii = 0; ii <= 40; ii++)
+  for (ii = 0; ii <= FIB_ITERATION; ii++)
     {
       int result = 0;
       fib (&result, ii); 
       printf("fib (%2d) = %10d\n", ii, result);
     }
 #else
-  for (ii = 0; ii <= 40; ii++)
+  for (ii = 0; ii <= FIB_ITERATION; ii++)
     {
       fib (&fib_result[ii], ii);
       fib_serial_result[ii] = fib_serial (ii);
     }
 
-  for (ii = 0; ii <= 40; ii++)
+  for (ii = 0; ii <= FIB_ITERATION; ii++)
     {
       if (fib_result[ii] != fib_serial_result[ii])
 	error = 1;
     }
 #endif
+  
+  if (error != 0)
+    __builtin_abort ();
   return error;
 }
 
@@ -44,8 +49,8 @@ 
     return n;
   else
     {
-      fib (&x, n-1);
-      fib (&y, n-2);
+      x = fib_serial (n-1);
+      y = fib_serial (n-2);
       return (x+y);
     }
 }