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

    <tr>
        <th>Summary</th>
        <td>
            perl print_long_double test fails on ppc64le with -mabi=ieeelongdouble
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            backend:PowerPC
      </td>
    </tr>

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

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

<pre>
    I spent some time investigating this and my guess is that it is some kind of issue with the calling convention used for ieee long double.  The failing test case passes these values through several va_args functions.

I observed this bug in both clang 15 and clang 16.  Here is how to reproduce:

```
dnf install systemtap-sdt-devel bzip2-devel compat-gdbm-devel git

git clone https://github.com/Perl/perl5
cd perl5
git checkout v5.36.0


/bin/sh Configure -Dusedevel -des -Doptimize=none '-Dccflags=-O2  -mabi=ieeelongdouble -g -Wp,-D_FORTIFY_SOURCE=2 -m64 -mcpu=power8 -mtune=power8' '-Dccdlflags=-Wl,--enable-new-dtags -Wl,-z,relro -Wl,--as-needed  -Wl,-z,now -Wl,--build-id=sha1 ' '-Dlddlflags=-shared -Wl,-z,relro -Wl,--as-needed -Wl,-z,now  -Wl,--build-id=sha1 ' -Dshrpdir=/usr/lib64 -DDEBUGGING=-g -Dversion=5.36.0 -Dmyhostname=localhost -Dcc=clang '-Dcf_by=Red Hat, Inc.' -Dprefix=/usr -Dvendorprefix=/usr -Dsiteprefix=/usr/local -Dsitelib=/usr/local/share/perl5/5.36 -Dsitearch=/usr/local/lib64/perl5/5.36 -Dprivlib=/usr/share/perl5 -Dvendorlib=/usr/share/perl5/vendor_perl -Darchlib=/usr/lib64/perl5 -Dvendorarch=/usr/lib64/perl5/vendor_perl -Darchname=ppc64le-linux-thread-multi '-Dlibpth=/usr/local/lib64 /lib64 /usr/lib64' -Duseshrplib -Dusethreads -Duseithreads -Dusedtrace=/usr/bin/dtrace -Duselargefiles -Dd_semctl_semun -Di_db -Ui_ndbm -Di_gdbm -Di_shadow -Di_syslog -Dman3ext=3pm -Duseperlio -Dinstallusrbinperl=n -Ubincompat5005 -Uversiononly '-Dpager=/usr/bin/less -isr' -Dd_gethostent_r_proto -Ud_endhostent_r_proto -Ud_sethostent_r_proto -Ud_endprotoent_r_proto -Ud_setprotoent_r_proto -Ud_endservent_r_proto -Ud_setservent_r_proto -Dscriptdir=/usr/bin -Dusesitecustomize -Duse64bitint

# Build
make -j8

# Run test
LD_LIBRARY_PATH=.:${LD_LIBRARY_PATH} ./perl -I./lib ext/XS-APItest/t/printf.t
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyMVt1u3CoQfhr2ZoTlxfuXi71I4rpdqTqN0kY9vbLAjG0aDBbgTdOnP8J2t8luWh0pWTPDMN_8MQP3XjUGcU_WN2SdL_gQWuv2wQfUmruFsPJ5fwDfowngbYcQVIegzBF9UA0PyjQQWuWBGwndMzQDeg_KQ2h5ABXicjz3qIwEW4PyfkB4UqGF0CJUXOuoo7LmiCYoa2DwKKG2DhQigramAWkHoTEB-NIi1FyNRwL6ABX3CD33HiMkeoQj18NIODs0LXg8ouMajrzkrvFQD6aKMD4haU7S6-n3AFZ4dEeUkzdiaEAZEDa0UGluGliuRxdnYpMAfECH0b3WPkGw4LB3Vg4Vkuz6pWqySee_kZSmBmV84FqDf_YBu8B76mWgEo-oQfxUPZvXle16HmgjRTdzGhVe6m5UgEpbg9CG0PuIzArCikaFdhBJZTvCijt0mrCiR6fX07FKwgtqVNJi9WiHAMd1km2S9JUD0y8rhDKEFb6FW2tq1QwOgeYxW6NpVKIHmts-qE79RJLlJhpG2JbmVVVr3niS5fQTA6AdF4pkeUxwzO-UXqAN0K89Ybc0L4tP918Oxbfy86eH-9t3JMsZ0G6zAtpV_UCyvLdP6HZAuzAYPNGEbX8BSn2C_KqjToqGC43U4BOVgTce5o2fhN061M7-YlDuqUGUKOGljLFPJwkxKC2pkiTLfcuXc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