[cfe-dev] Crash in codegen with incompatible pointers

Eli Friedman eli.friedman at gmail.com
Fri Jan 25 22:03:09 PST 2008


Simple test:
int a() {
int i; short j;
float* k = 1 ? &i : &j;
}

This crashes in codegen because clang warns, and then neglects to
actually make the types match.

Patch attached.  As noted, I deciced to coerce both pointers to void*
because that's what gcc does.

-Eli
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: incompatptrfix.txt
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20080125/e0ed63aa/attachment.txt>


More information about the cfe-dev mailing list