https://bugs.llvm.org/show_bug.cgi?id=40784

            Bug ID: 40784
           Summary: Crash in MC with alias of alias.
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Backend: WebAssembly
          Assignee: unassignedb...@nondot.org
          Reporter: s...@chromium.org
                CC: llvm-bugs@lists.llvm.org

```
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:

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to