efriedma-quic wrote:

> Why are we creating a comdat here in the first place? 

I guess that's b2615aa4... but I'm pretty sure we fixed -fdata-sections so the 
backend automatically generates comdats.  So maybe we should just revert that.

> If we allow creating a comdat associated with an internal symbol, the backend 
> should handle it correctly; it's a bug if it crashes like you've described. 
> (I'm not sure how to reproduce the crash with your testcase, though.)

LangRef says "Because the name of the object must match the name of the COMDAT 
group, the linkage of the global object must not be local; local symbols can 
get renamed if a collision occurs in the symbol table."  I think that means the 
IR clang generates is illegal, but I guess nothing in the backend actually 
checks this.

https://github.com/llvm/llvm-project/pull/71748
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to