[LLVMdev] Question about node collapse

Tim Northover t.p.northover at gmail.com
Sun Dec 14 08:59:26 PST 2014


> Based on my understanding of DSA, *((char *)a) = 1 will cause the node to
> which "a" points to collapsed because I think there is type-inconsistency
> here in the sense that a is declared as int* and used as int* when *a = 256
> happens while is used as char* afterwards.

I'm not familiar with DSA (ds-aa?) so I can't say for sure what it
does, but char (both signed and unsigned) is special in the C and C++
aliasing rules. You're allowed to access any object via a pointer to
char (E.g. C99 6.5p7).

Cheers.

Tim.



More information about the llvm-dev mailing list