[rs6000,committed] Fix undef-bool-* tests for older BE processors

Message ID 69943b50-48f4-47e7-1ee7-f6deb0090c0a@linux.ibm.com
State New
Headers show
Series
  • [rs6000,committed] Fix undef-bool-* tests for older BE processors
Related show

Commit Message

Bill Schmidt April 18, 2018, 2:01 a.m.
Hi,

The new tests g++.dg/ext/undef-bool-1.C and gcc.target/powerpc/undef-bool-2.c
fail on big-endian systems not configured to use VSX instructions by default.
This patch allows them to run correctly on such systems by adding the -mvsx
option.

Tested on a Power7 configured with the default (same as --with-cpu=power4),
target triple powerpc64-linux-gnu.  Committed as obvious.

Thanks,
Bill


[gcc/testsuite]

2018-04-17  Bill Schmidt  <wschmidt@linux.ibm.com>

	* gcc.target/powerpc/undef-bool-2.c: Add -mvsx.
	* gcc.target/g++.dg/ext/undef-bool-1.C: Likewise.

Patch

Index: gcc/testsuite/gcc.target/powerpc/undef-bool-2.c
===================================================================
--- gcc/testsuite/gcc.target/powerpc/undef-bool-2.c	(revision 259455)
+++ gcc/testsuite/gcc.target/powerpc/undef-bool-2.c	(working copy)
@@ -1,5 +1,5 @@ 
 /* { dg-do compile } */
-/* { dg-options "-O2 -std=c11 -DNO_WARN_X86_INTRINSICS" } */
+/* { dg-options "-O2 -std=c11 -DNO_WARN_X86_INTRINSICS -mvsx" } */
 
 /* Test to ensure that "bool" gets undef'd in xmmintrin.h when
    we require strict ANSI.  Subsequent use of bool needs stdbool.h.
Index: gcc/testsuite/g++.dg/ext/undef-bool-1.C
===================================================================
--- gcc/testsuite/g++.dg/ext/undef-bool-1.C	(revision 259455)
+++ gcc/testsuite/g++.dg/ext/undef-bool-1.C	(working copy)
@@ -1,5 +1,5 @@ 
 /* { dg-do compile { target { powerpc*-*-* } } } */
-/* { dg-options "-O2 -DNO_WARN_X86_INTRINSICS" } */
+/* { dg-options "-O2 -DNO_WARN_X86_INTRINSICS -mvsx" } */
 
 /* Test to ensure that "bool" gets undef'd in xmmintrin.h when
    we require strict ANSI.  */