1  /* { dg-do run { target avx512fp16 } } */
       2  /* { dg-options "-O2 -mavx512fp16" } */
       3  
       4  #include <string.h>
       5  
       6  static void do_test (void);
       7  
       8  #define DO_TEST do_test
       9  #define AVX512FP16
      10  #include "avx512-check.h"
      11  #include "avx512fp16-3a.c"
      12  
      13  __m512h
      14  __attribute__ ((noinline,noclone))
      15  foo3 (__m512h x)
      16  {
      17    return foo1(x[0]);
      18  }
      19  
      20  static void
      21  do_test (void)
      22  {
      23    _Float16 x = 25.3;
      24    union512h u = { x, 3.5f, -5.9f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f,
      25  		  2.0f, -2.3f, 0.0f, 0.0f, 10.4f, 0.0f, 0.0f, 0.0f,
      26  		  3.0f, -3.2f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f,
      27  		  4.0f, -4.20f, 0.0f, 0.0f, 0.0f, -8.7f, 0.0f, 0.0f };
      28  
      29    union512h exp = { x, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f,
      30  		    0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f,
      31  		    0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f,
      32  		    0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f };
      33    __m512h v;
      34    union512h a;
      35    memset (&v, -1, sizeof (v));
      36    v = foo3 (u.x);
      37    a.x = v;
      38    if (check_union512h (a, exp.a))
      39      abort ();
      40  }