diff mbox

[testsuite,i386] Declare fma in gcc.target/i386/pr59390.c

Message ID ydd1u0lmebt.fsf@lokon.CeBiTec.Uni-Bielefeld.DE
State New
Headers show

Commit Message

Rainer Orth Jan. 6, 2014, 1:26 p.m. UTC
The new Declare fma in gcc.target/i386/pr59390*.c tests were FAILing on
Solaris 9/x86, which lacks C99 support:

FAIL: gcc.target/i386/pr59390.c (test for excess errors)

Excess errors:
/vol/gcc/src/hg/trunk/local/gcc/testsuite/gcc.target/i386/pr59390.c:12:9: warnin
g: implicit declaration of function 'fma' [-Wimplicit-function-declaration]
/vol/gcc/src/hg/trunk/local/gcc/testsuite/gcc.target/i386/pr59390.c:12:18: warni
ng: incompatible implicit declaration of built-in function 'fma' [enabled by def
ault]

This patch fixes this by declaring fma() directly instead of relying on
<math.h>, like many other testcases already do.

Tested on i386-pc-solaris2.9, i386-pc-solaris2.10, and
x86_64-unknown-linux-gnu, installed on mainline.

	Rainer


2014-01-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

	* gcc.target/i386/pr59390.c: Replace math.h by fma declaration.
	* gcc.target/i386/pr59390_1.c: Likewise.
	* gcc.target/i386/pr59390_2.c: Likewise.
diff mbox

Patch

# HG changeset patch
# Parent 756e0ac368a0ebe940873aa37cdf510600f32bef
Declare fma in gcc.target/i386/pr59390.c

diff --git a/gcc/testsuite/gcc.target/i386/pr59390.c b/gcc/testsuite/gcc.target/i386/pr59390.c
--- a/gcc/testsuite/gcc.target/i386/pr59390.c
+++ b/gcc/testsuite/gcc.target/i386/pr59390.c
@@ -1,7 +1,7 @@ 
 /* { dg-do compile } */
 /* { dg-options "-std=c99 -O3" } */
 
-#include "math.h"
+extern double fma (double, double, double);
 void fun() __attribute__((target("fma")));
 
 void 
diff --git a/gcc/testsuite/gcc.target/i386/pr59390_1.c b/gcc/testsuite/gcc.target/i386/pr59390_1.c
--- a/gcc/testsuite/gcc.target/i386/pr59390_1.c
+++ b/gcc/testsuite/gcc.target/i386/pr59390_1.c
@@ -1,7 +1,7 @@ 
 /* { dg-do compile } */
 /* { dg-options "-std=c99 -O3" } */
 
-#include "math.h"
+extern double fma (double, double, double);
 void fun() __attribute__((target("fma")));
 
 __attribute__((target("fma")))
diff --git a/gcc/testsuite/gcc.target/i386/pr59390_2.c b/gcc/testsuite/gcc.target/i386/pr59390_2.c
--- a/gcc/testsuite/gcc.target/i386/pr59390_2.c
+++ b/gcc/testsuite/gcc.target/i386/pr59390_2.c
@@ -1,7 +1,7 @@ 
 /* { dg-do compile } */
 /* { dg-options "-std=c99 -O3 -mfma" } */
 
-#include "math.h"
+extern double fma (double, double, double);
 void fun() __attribute__((target("fma")));
 
 void