[testsuite, i386] Correctly require C99 support in avx512f tests

Rainer Orth ro@CeBiTec.Uni-Bielefeld.DE
Mon Jan 6 13:42:00 GMT 2014

Several of the new AVX512F tests were FAILing on Solaris 10+/x86:

FAIL: gcc.target/i386/avx512f-vcmppd-2.c (test for excess errors)
WARNING: gcc.target/i386/avx512f-vcmppd-2.c compilation failed to produce executable

Excess errors:
Undefined                       first referenced
 symbol                             in file
isunordered                         /var/tmp//cc33Hbdi.o
ld: fatal: symbol referencing errors. No output written to ./avx512f-vcmppd-2.exe

This happens because isunordered() in <math.h> is only visible with

FAIL: gcc.target/i386/avx512f-vfixupimmpd-2.c (test for excess errors)
WARNING: gcc.target/i386/avx512f-vfixupimmpd-2.c compilation failed to produce executable

Excess errors:
/vol/gcc/src/hg/trunk/local/gcc/testsuite/gcc.target/i386/avx512f-vfixupimmpd-2.c:26:29: error: 'NAN' undeclared (first use in this function)
/vol/gcc/src/hg/trunk/local/gcc/testsuite/gcc.target/i386/avx512f-vfixupimmpd-2.c:32:13: error: 'INFINITY' undeclared (first use in this function)

Likewise for NAN and INFINITY.

This patch fixes all those instances by adding -std=c99 and requiring

Two cases required extra care:


FAIL: gcc.target/i386/avx512f-vgetmantpd-2.c (test for excess errors)
Excess errors:
: warning: return type defaults to 'int' [enabled by default]

  This function needs to be declared void static to avoid the warning.

* Four testcases use M_PI_2 which is not in C99, so I'm compiling
  them with -std=gnu99 instead.

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


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

	* gcc.target/i386/avx512f-vcmppd-2.c: Add -std=c99.
	Require c99_runtime.
	* gcc.target/i386/avx512f-vcmpps-2.c: Likewise.

	* gcc.target/i386/avx512f-vfixupimmpd-2.c: Add -std=gnu99.
	Require c99_runtime.
	* gcc.target/i386/avx512f-vfixupimmps-2.c: Likewise.
	* gcc.target/i386/avx512f-vfixupimmsd-2.c: Likewise.
	* gcc.target/i386/avx512f-vfixupimmss-2.c: Likewise.

	* gcc.target/i386/avx512f-vgetmantpd-2.c: Add -std=c99.
	Require c99_runtime.
	Make CALC void static.
	* gcc.target/i386/avx512f-vgetmantps-2.c: Likewise.

	* gcc.target/i386/avx512f-vgetmantsd-2.c: Add -std=c99.
	Require c99_runtime.
	* gcc.target/i386/avx512f-vgetmantss-2.c: Likewise.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: testsuite-i386-avx512f-c99.patch
Type: text/x-patch
Size: 5367 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20140106/11352127/attachment.bin>
-------------- next part --------------

Rainer Orth, Center for Biotechnology, Bielefeld University

More information about the Gcc-patches mailing list