D-Programming-Language/dmd — pull request #2133 by donc (2013-06-05 07:10:03+00:00)
Title: Two more CTFE internal fixes relating to pointers

Both cases were exposed by trying to use CTFE to do the work of optimize(WANTinterpret).

(1) When checking pointer casts involving AddrExp, was checking the pointer type instead of the pointee type. Simple typo.

(2) optimize() changes AddrExp(globalvar) into a SymOffExp.
But optimize() isn't always called before CTFE, so we need to do it in CTFE too.