1 /* { dg-do compile { target { powerpc*-*-* } } } */
2 /* { dg-require-effective-target powerpc_p9vector_ok } */
3 /* { dg-options "-mdejagnu-cpu=power9 -mno-power9-vector" } */
4 
5 #include <altivec.h>
6 
7 /* This program's "test for excess errors" demonstrates that combining
8    the target options -mcpu=power9 and -mno-power9-vector does not
9    result in an error.  A previous version of the compiler aborted
10    with the error message:
11 
12       "power9-dform requires power9-vector."
13 
14    when these two options were used in combination.
15 
16    The newer version of the compiler, instead, automatically disables
17    power9-dform when the -mno-power9-vector command-line option is
18    specified.  */
19 int
test_any_equal(vector bool char * arg1_p,vector bool char * arg2_p)20 test_any_equal (vector bool char *arg1_p, vector bool char *arg2_p)
21 {
22   vector bool char arg_1 = *arg1_p;
23   vector bool char arg_2 = *arg2_p;
24 
25   return vec_any_eq (arg_1, arg_2);
26 }
27 
28