[PATCH, ciklplus]: Use -ffloat-store for 32bit x86 in cilk-plus/AN/builtin_fn_{custom,mutating}.c

Uros Bizjak ubizjak@gmail.com
Sat Nov 22 20:23:00 GMT 2014


Hello!

These two tests fix PR target/63847 [1], where x87 excess precision
causes testcase to fail. The problem was triggered by -fpic, please
see the PR for analysis.

The patch adds -ffloat-store for 32bit x86 target, a standard and well
tested solution for this problem.

2014-11-22  Uros Bizjak  <ubizjak@gmail.com>

    PR target/63847
    * c-c++-common/cilk-plus/AN/builtin_fn_custom.c: Add -ffloat-store
    for 32bit x86 targets.
    * c-c++-common/cilk-plus/AN/builtin_fn_mutating.c: Ditto.

The patch was tested on x86_64-linux-gnu/-m32 {,-fpic}.

OK for mainline?

[1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63847

Uros.
-------------- next part --------------
Index: c-c++-common/cilk-plus/AN/builtin_fn_custom.c
===================================================================
--- c-c++-common/cilk-plus/AN/builtin_fn_custom.c	(revision 217961)
+++ c-c++-common/cilk-plus/AN/builtin_fn_custom.c	(working copy)
@@ -1,5 +1,6 @@
 /* { dg-do run } */
 /* { dg-options "-fcilkplus" } */
+/* { dg-additional-options "-ffloat-store" { target { { i?86-*-* x86_64-*-* } && ilp32 } } } */
 
 #define NUMBER 100
 #if HAVE_IO
Index: c-c++-common/cilk-plus/AN/builtin_fn_mutating.c
===================================================================
--- c-c++-common/cilk-plus/AN/builtin_fn_mutating.c	(revision 217961)
+++ c-c++-common/cilk-plus/AN/builtin_fn_mutating.c	(working copy)
@@ -1,5 +1,6 @@
 /* { dg-do run } */
 /* { dg-options "-fcilkplus" } */
+/* { dg-additional-options "-ffloat-store" { target { { i?86-*-* x86_64-*-* } && ilp32 } } } */
 
 #define NUMBER 100
 #if HAVE_IO


More information about the Gcc-patches mailing list