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

    <tr>
        <th>Summary</th>
        <td>
            packed struct with template
        </td>
    </tr>

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

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

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

<pre>
    This small test case provokes a crash in clang-14 and clang-15:

struct __attribute__((packed)) {
           unsigned options ;
  template <typename T> getOptions()
    {
      (T *) & options;
    }
};
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJxdUcty6yAM_RrYMM1gMLZZsGhu2m032WdkW7W5xY8xcjP9-xInaTplNCBxhM6RqKf2yx17H0UcIARBGEk0EFHMy_Q5fWAUIJoFYi_8KJoAY_eU5QLG9h4Ypp-ZPDB52yMta0PidAKixdcr4enEVJVshuYDW6ZsMsHK_TVfPNY6Rt-N2IppJj-NUTD9k0Q4zAEI090_-ppxhAHFkekX0SG9XfM3Gvso-4cjwce0PW_0qriz_CK5PDncmkmO3nN0WVGYsspLWfLW6dZqC5w8BXTXfsSt4bOn_kclX5fgeqI5XqajXpN1CV_rXTMNKQjh8348pUH_x4ZS6GNcMXXxaipdSt47UxQZvGel1dBaNFhLrDJZm7K2Npem4gFqDNExs2dKjXgWW4nkM3Pg3impVCazXGWmUuXOaF2VxgIoKYvWKJZLHMCH3UXHblo6vrhNUr12MYHBR4oPEOL2PbjRpfqwUj8troNzHfhG7Dbh33Uqst0">