(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.target/
aarch64/
sve/
acle/
general-c/
tbl_tuple_1.c
       1  /* { dg-do compile } */
       2  /* { dg-additional-options "-std=c99 -Wall -Wextra" } */
       3  
       4  #include <arm_sve.h>
       5  
       6  #pragma GCC target ("arch=armv8.2-a+sve2")
       7  
       8  svfloat64_t
       9  f1 (svbool_t pg, svint8_t s8, svuint8_t u8,
      10      svint8x2_t s8x2, svuint8x2_t u8x2, svuint8x3_t u8x3)
      11  {
      12    svfloat64_t f64;
      13  
      14    u8 = svtbl2 (u8x2); /* { dg-error {too few arguments to function 'svtbl2'} } */
      15    u8 = svtbl2 (u8x2); /* { dg-error {too few arguments to function 'svtbl2'} } */
      16    u8 = svtbl2 (u8x2, u8, 3); /* { dg-error {too many arguments to function 'svtbl2'} } */
      17    u8 = svtbl2 (u8, u8); /* { dg-error {passing single vector 'svuint8_t' to argument 1 of 'svtbl2', which expects a tuple of 2 vectors} } */
      18    u8 = svtbl2 (u8x3, u8); /* { dg-error {passing 'svuint8x3_t' to argument 1 of 'svtbl2', which expects a tuple of 2 vectors} } */
      19    u8 = svtbl2 (pg, u8); /* { dg-error {passing 'svbool_t' to argument 1 of 'svtbl2', which expects a tuple of 2 vectors} } */
      20    u8 = svtbl2 (u8x2, u8x2); /* { dg-error {passing 'svuint8x2_t' to argument 2 of 'svtbl2', which expects a single SVE vector rather than a tuple} } */
      21    u8 = svtbl2 (u8x2, f64); /* { dg-error {passing 'svfloat64_t' to argument 2 of 'svtbl2', which expects a vector of unsigned integers} } */
      22    u8 = svtbl2 (u8x2, pg); /* { dg-error {passing 'svbool_t' to argument 2 of 'svtbl2', which expects a vector of unsigned integers} } */
      23    u8 = svtbl2 (u8x2, u8);
      24    u8 = svtbl2 (u8x2, s8); /* { dg-error {passing 'svint8_t' to argument 2 of 'svtbl2', which expects a vector of unsigned integers} } */
      25    s8 = svtbl2 (s8x2, f64); /* { dg-error {passing 'svfloat64_t' to argument 2 of 'svtbl2', which expects a vector of unsigned integers} } */
      26    s8 = svtbl2 (s8x2, pg); /* { dg-error {passing 'svbool_t' to argument 2 of 'svtbl2', which expects a vector of unsigned integers} } */
      27    s8 = svtbl2 (s8x2, u8);
      28    s8 = svtbl2 (s8x2, s8); /* { dg-error {passing 'svint8_t' to argument 2 of 'svtbl2', which expects a vector of unsigned integers} } */
      29  
      30    return f64;
      31  }