1  /* Test AAPCS64 layout.
       2  
       3     C.3 If the argument is an HFA then the NSRN is set to 8 and the size
       4     of the argument is rounded up to the nearest multiple of 8 bytes.
       5  
       6     TODO: add the check of an HFA containing half-precision floating-point
       7     when __f16 is supported in A64 GCC.  */
       8  
       9  /* { dg-do run { target aarch64*-*-* } } */
      10  
      11  #ifndef IN_FRAMEWORK
      12  #define TESTFILE "test_align-4.c"
      13  
      14  struct z1
      15  {
      16    double x[4];
      17  };
      18  
      19  struct z1 a = { 5.0, 6.0, 7.0, 8.0 };
      20  
      21  struct z2
      22  {
      23    float x[3];
      24  };
      25  
      26  struct z2 b = { 13.f, 14.f, 15.f };
      27  struct z2 c = { 16.f, 17.f, 18.f };
      28  
      29  #include "abitest.h"
      30  #else
      31  
      32    ARG(struct z1, a, D0)
      33    ARG(double, 9.0, D4)
      34    ARG(double, 10.0, D5)
      35    ARG(struct z2, b, STACK)       /* [C.3] on stack and size padded to 16 bytes */
      36  #ifndef __AAPCS64_BIG_ENDIAN__
      37    ARG(float, 15.5f, STACK+16)    /* [C.3] NSRN has been set to 8 */
      38  #else
      39    ARG(float, 15.5f, STACK+20)
      40  #endif
      41    LAST_ARG(struct z2, c, STACK+24)
      42  #endif