<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/86371>86371</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            [X86_64] va_arg with SSE type get error
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          CoTinker
      </td>
    </tr>
</table>

<pre>
    demo.c
```
#include <stdlib.h>
#include <stdio.h>
#include <string.h>

struct S271 { union{}a; double b;} ;
struct S271 s271;
void check271va (int z, ...) {
    struct S271 arg;
    va_list ap;
    __builtin_va_start(ap, z);
    arg = __builtin_va_arg(ap, struct S271);
    long double a = __builtin_va_arg(ap, long double);
    printf("%Lf\n", a);
    if (a != 2.0L)
       printf("Fail\n");
 __builtin_va_end(ap);
}
int main (void) {
    printf("%lu\n", sizeof(s271));
    check271va (2, s271, 2.0L);
}
```
clang
```
16
0.000000
Fail
```
gcc
```
16
2.000000
```
https://godbolt.org/z/o6v318vWM
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJx8VE9v4y4Q_TTjC6oFg__l4EOT1Kf-Tv1Ju7cI28RhSyACnKr59CucNE3cbqPI2Lw3bx4zgPBeDUbKGvIl5OtEjGFnXb2y_yvzKl3S2v697uXeph3QNdBHKOjlf_5Erkynx14S4Csfeq3adAf86R-wsj-gTpnhFp6ePrixC-QFS0agXJLRKGugXEK5FsCXpLdjqyVpgccpEocvcR5LdgWOVvWk28nuFUt2FASwUiaQE-CKpGkKuIh5zlxCCLkVEm646kTsKDZa-UDE4W56s2lHpYMym6PY-CBcAKzEIWY4AS7uuMINBPj6Pibm-Yi4yT-P1dYMHwUQP6vcUOcqB6dM2AJWgAiYP28hX5npfUXEnKy2sWCxaizmw5Q-R8oVn-k1Qumr3I3SnU9p-ovPTwaU6_NL7M1eKBPTxtZ96c_Mvh5v7Ht1kjZi_lK92Wrut8E5ZGKuriv7Ymh2AjotzPAtworzSFM6_c5fU0W-ow_d90fsQwbvZGakXQgHD_wRsAFsBtu3VofUxg3QnAAbWxw5q46__kv6mvcLvhCJrFnJGCsyynmyq7MOebXtSlr0rGVVu1iUW9HTtqWV6IsiS1SNFDPKkVOOlPNUirzikuaszViHfQUZlXuhdKr1cR9zJ8r7UdZVwUuWaNFK7ad7BtHINzKBsU_5OnF1jHlox8FDRuOR8p8qQQU9XVC_q2JTZJCvyXlzkzcVduTl5YmE94MkgwxEOmddMjpdzyqiwm5s087uAZuofBkeDs7-kV0AbCY_HrCZ_P4NAAD__xAjZfk">