<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 - Crash in MC with alias of alias."
   href="https://bugs.llvm.org/show_bug.cgi?id=40784">40784</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Crash in MC with alias of alias.
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>libraries
          </td>
        </tr>

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

        <tr>
          <th>Hardware</th>
          <td>PC
          </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>Backend: WebAssembly
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>sbc@chromium.org
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>```
target datalayout = "e-m:e-p:32:32-i64:64-n32:64-S128"                          
target triple = "wasm32-unknown-unknown-wasm"                                   

@foo = alias i8, bitcast (i8* ()* @func to i8*)                                 
@bar = alias i8* (), i8* ()* @func                                              
@bar2 = alias i8* (), i8* ()* @bar                                              

define i8* @func() {                                                            
  call i8* @bar2();                                                             
  ret i8* @foo;                                                                 
}  
```   


Results in:

llc:
/usr/local/google/home/sbc/dev/wasm/llvm-project/llvm/include/llvm/MC/MCSymbol.h:323:
uint64_t llvm::MCSymbol::getOffset() const: Assertion `(SymbolContents ==
SymContentsUnset || SymbolContents == SymContentsOffset) && "Cannot get offset
for a common/variable symbol"' failed.
Stack dump:</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>