[PATCH] Make gcc.dg/tree-ssa/pr71078-3.c more robust

Richard Biener rguenther@suse.de
Thu Feb 2 08:58:00 GMT 2017


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); 



More information about the Gcc-patches mailing list