This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Make gcc.dg/tree-ssa/pr71078-3.c more robust
- From: Richard Biener <rguenther at suse dot de>
- To: gcc-patches at gcc dot gnu dot org
- Date: Thu, 2 Feb 2017 09:57:53 +0100 (CET)
- Subject: [PATCH] Make gcc.dg/tree-ssa/pr71078-3.c more robust
- Authentication-results: sourceware.org; auth=none
On one machine I see gcc.dg/tree-ssa/pr71078-3.c FAILing with -m32
because libc provides
extern __inline __attribute__ ((__always_inline__)) __attribute__
((__gnu_inline__)) double __attribute__ ((__nothrow__ , __leaf__)) fabs
(double __x) { return __builtin_fabs (__x); }
which makes CSE necessary to catch the pattern (see PR79333). The
following adjusts the testcase to not rely on math.h.
Tested on x86_64-unknown-linux-gnu, applied.
Richard.
2017-02-02 Richard Biener <rguenther@suse.de>
* gcc.dg/tree-ssa/pr71078-3.c: Do not rely on math.h.
Index: gcc/testsuite/gcc.dg/tree-ssa/pr71078-3.c
===================================================================
--- gcc/testsuite/gcc.dg/tree-ssa/pr71078-3.c (revision 245090)
+++ gcc/testsuite/gcc.dg/tree-ssa/pr71078-3.c (working copy)
@@ -1,9 +1,10 @@
/* { dg-do compile } */
/* { dg-require-effective-target large_double } */
/* { dg-require-effective-target c99_runtime } */
-/* { dg-options "-O2 -ffast-math -fdump-tree-forwprop-details" } */
+/* { dg-options "-O2 -ffast-math -fdump-tree-forwprop1-details" } */
+
+extern double fabs (double);
-#include <math.h>
double f(float f)
{
double t1 = fabs(f);