+2017-04-12 Kelvin Nilsen <kelvin@gcc.gnu.org>
+
+ PR target/80315
+ * gcc.target/powerpc/pr80315-1.c: New test.
+ * gcc.target/powerpc/pr80315-2.c: New test.
+ * gcc.target/powerpc/pr80315-3.c: New test.
+ * gcc.target/powerpc/pr80315-4.c: New test.
+
2017-04-16 Tom de Vries <tom@codesourcery.com>
* g++.dg/parse/error11.C: Remove braces around line number in dejagnu
--- /dev/null
+/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power8" } } */
+/* { dg-require-effective-target powerpc_p8vector_ok } */
+/* { dg-options "-mcpu=power8" } */
+
+int
+main()
+{
+ __attribute__((altivec(vector__))) unsigned int test, res;
+ const int s0 = 0;
+ int mask;
+
+ /* Argument 2 must be 0 or 1. Argument 3 must be in range 0..15. */
+ res = __builtin_crypto_vshasigmaw (test, 1, 0xff); /* { dg-error "argument 3 must be in the range 0..15" } */
+ return 0;
+}
--- /dev/null
+/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power8" } } */
+/* { dg-require-effective-target powerpc_p8vector_ok } */
+/* { dg-options "-mcpu=power8" } */
+
+int
+main ()
+{
+ __attribute__((altivec(vector__))) unsigned long long test, res;
+ const int s0 = 0;
+ int mask;
+
+ /* Argument 2 must be 0 or 1. Argument 3 must be in range 0..15. */
+ res = __builtin_crypto_vshasigmad (test, 1, 0xff); /* { dg-error "argument 3 must be in the range 0..15" } */
+ return 0;
+}
--- /dev/null
+/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power8" } } */
+/* { dg-require-effective-target powerpc_p8vector_ok } */
+/* { dg-options "-mcpu=power8" } */
+
+#include <altivec.h>
+
+vector unsigned int
+main ()
+{
+ vector unsigned int test, res;
+ const int s0 = 0;
+ int mask;
+
+ /* Argument 2 must be 0 or 1. Argument 3 must be in range 0..15. */
+ res = vec_shasigma_be (test, 1, 0xff); /* { dg-error "argument 3 must be in the range 0..15" } */
+ return res;
+}
--- /dev/null
+/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power8" } } */
+/* { dg-require-effective-target powerpc_p8vector_ok } */
+/* { dg-options "-mcpu=power8" } */
+
+#include <altivec.h>
+
+vector unsigned long long int
+main ()
+{
+ vector unsigned long long int test, res;
+ const int s0 = 0;
+ int mask;
+
+ /* Argument 2 must be 0 or 1. Argument 3 must be in range 0..15. */
+ res = vec_shasigma_be (test, 1, 0xff); /* { dg-error "argument 3 must be in the range 0..15" } */
+ return res;
+}