+2018-04-03 Bill Schmidt <wschmidt@linux.ibm.com>
+
+ * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
+ than vector.
+ (_mm_cvtpd_ps): Likewise.
+ (_mm_cvttpd_epi32): Likewise.
+ * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
+ * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
+ vector, pixel, and bool following altivec.h include.
+
2018-04-03 Martin Sebor <msebor@redhat.com>
* doc/extend.texi (Common Function Attributes): Clarify.
#ifdef _ARCH_PWR8
temp = vec_mergeo (temp, temp);
- result = (__v4si)vec_vpkudum ((vector long)temp, (vector long)vzero);
+ result = (__v4si)vec_vpkudum ((__vector long)temp, (__vector long)vzero);
#else
{
const __v16qu pkperm = {0x00, 0x01, 0x02, 0x03, 0x08, 0x09, 0x0a, 0x0b,
#ifdef _ARCH_PWR8
temp = vec_mergeo (temp, temp);
- result = (__v4sf)vec_vpkudum ((vector long)temp, (vector long)vzero);
+ result = (__v4sf)vec_vpkudum ((__vector long)temp, (__vector long)vzero);
#else
{
const __v16qu pkperm = {0x00, 0x01, 0x02, 0x03, 0x08, 0x09, 0x0a, 0x0b,
#ifdef _ARCH_PWR8
temp = vec_mergeo (temp, temp);
- result = (__v4si)vec_vpkudum ((vector long)temp, (vector long)vzero);
+ result = (__v4si)vec_vpkudum ((__vector long)temp, (__vector long)vzero);
#else
{
const __v16qu pkperm = {0x00, 0x01, 0x02, 0x03, 0x08, 0x09, 0x0a, 0x0b,
a = (__vector unsigned char)vec_splats (__m1);
b = (__vector unsigned char)vec_splats (__m2);
c = vec_mergel (a, b);
- return (__builtin_unpack_vector_int128 ((vector __int128_t)c, 1));
+ return (__builtin_unpack_vector_int128 ((__vector __int128_t)c, 1));
#else
__m64_union m1, m2, res;
#define _XMMINTRIN_H_INCLUDED
#include <altivec.h>
+
+/* Avoid collisions between altivec.h and strict adherence to C++ and
+ C11 standards. This should eventually be done inside altivec.h itself,
+ but only after testing a full distro build. */
+#if defined(__STRICT_ANSI__) && (defined(__cplusplus) || \
+ (defined(__STDC_VERSION__) && \
+ __STDC_VERSION__ >= 201112L))
+#undef vector
+#undef pixel
+#undef bool
+#endif
+
#include <assert.h>
/* We need type definitions from the MMX header file. */
+2018-04-03 Bill Schmidt <wschmidt@linux.ibm.com>
+
+ * gcc.target/powerpc/powerpc.exp: Add .C suffix for main loop.
+ * gcc.target/powerpc/undef-bool-1.C: New file.
+ * gcc.target/powerpc/undef-bool-2.c: New file.
+
2018-04-03 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/84768
dg-init
# Main loop.
-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.\[cS\]]] \
+dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.\[cCS\]]] \
"" $DEFAULT_CFLAGS
set SAVRES_TEST_OPTS [list -Os -O2 {-Os -mno-multiple} {-O2 -mno-multiple}]
--- /dev/null
+/* { dg-do compile } */
+/* { dg-options "-O2 -std=c++11 -DNO_WARN_X86_INTRINSICS" } */
+
+/* Test to ensure that "bool" gets undef'd in xmmintrin.h when
+ we require strict ANSI. */
+
+#include <xmmintrin.h>
+
+bool foo (int x)
+{
+ return x == 2;
+}
+
--- /dev/null
+/* { dg-do compile } */
+/* { dg-options "-O2 -std=c11 -DNO_WARN_X86_INTRINSICS" } */
+
+/* Test to ensure that "bool" gets undef'd in xmmintrin.h when
+ we require strict ANSI. Subsequent use of bool needs stdbool.h.
+ altivec.h should eventually avoid defining bool, vector, and
+ pixel, following distro testing. */
+
+#include <xmmintrin.h>
+
+bool foo (int x) /* { dg-error "unknown type name 'bool'; did you mean '_Bool'?" } */
+{
+ return x == 2;
+}
+