<html>
    <head>
      <base href="http://llvm.org/bugs/" />
    </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 --- - Homegeneous aggregates with C++ base classes passed incorrectly on PPC64, ARM, and Aarch64"
   href="http://llvm.org/bugs/show_bug.cgi?id=21398">21398</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Homegeneous aggregates with C++ base classes passed incorrectly on PPC64, ARM, and Aarch64
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Windows NT
          </td>
        </tr>

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

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

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

        <tr>
          <th>Component</th>
          <td>LLVM Codegen
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>rnk@google.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>david.majnemer@gmail.com, james.molloy@arm.com, llvmbugs@cs.uiuc.edu, t.p.northover@gmail.com
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Consider:

struct Base {
  int x;
};
struct HVA : Base {
  double y, z;
};
void f(HVA x);
extern HVA h;
void g() {
  f(h);
}

On ARM, Clang will pass this in r0, d0, and d1, but gcc will pass in r0-r5.

AArch64 uses the same code and PPC64 looks like it is duplicated from the same
routine, so I'm sure they have similar issues.

Back on 3.4 when we used to do record flattening, we would completely screw
this up and would only pass the two doubles. Currently we just misclassify, but
we pass all the data.

IMO we should refactor the homogeneous aggregate calculation code to accept an
architecture. There's more complexity in walking Clang types than there is in
the target-specific logic.</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>