(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.target/
loongarch/
zero-size-field-ret.c
       1  /* Test that LoongArch backend ignores zero-sized fields of aggregates in
       2     returning.  */
       3  
       4  /* { dg-do compile } */
       5  /* { dg-options "-O2 -mdouble-float -mabi=lp64d" } */
       6  /* { dg-final { scan-assembler-not "\\\$r4" } } */
       7  
       8  struct test
       9  {
      10    int empty1[0];
      11    double empty2[0];
      12    int : 0;
      13    float x;
      14    long empty3[0];
      15    long : 0;
      16    float y;
      17    unsigned : 0;
      18    char empty4[0];
      19  };
      20  
      21  extern struct test callee (void);
      22  
      23  float
      24  caller (void)
      25  {
      26    struct test test = callee ();
      27    return test.x + test.y;
      28  }