<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Passing of packed structures on sparc64 different than in gcc"
   href="https://bugs.llvm.org/show_bug.cgi?id=40153">40153</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Passing of packed structures on sparc64 different than in gcc
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Other
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>-New Bugs
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedclangbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>simonas+llvm.org@kazlauskas.me
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>htmldeveloper@gmail.com, llvm-bugs@lists.llvm.org, neeilans@live.com, richard-llvm@metafoo.co.uk
          </td>
        </tr></table>
      <p>
        <div>
        <pre>This bug has been originally discovered by Michael Karcher. Filling the bug on
behalf of them.

---

As noted while filing a bug on rustc because rustc does not correctly implement
the Sparc64 ABI regarding floating point fields of "small" structures, I
stumbled across a difference between gcc an clang, as shown in
<a href="https://github.com/rust-lang/rust/issues/57103">https://github.com/rust-lang/rust/issues/57103</a> (the important piece is quoted
below):

struct str3 {
  float f;  // passed in most-significant half of %o0 (gcc) or in %f0 (clang)
  int i;    // passed in least-significant half of %o0
} __attribute__((packed));

Without __attribute__((packed)), clang, gcc and the ABI standard agree to pass
f in %f0. The ABI standard doesn't contain anything about packed structures, so
I don't see a way to decide whether gcc or clang is right. I report a bug on
both products to raise awareness.</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>