When GlobalOpt splits an internal, global variable with an aggregate type, it should propagate the externally_initialized flag to the newly created globals.
This makes the pass safe for our downstream use of this flag, while still allowing some useful optimisations (such as removing dead parts of the split aggregate) to be performed. However, I'm not familiar enough with the other uses of this flag (Objective-C selectors and the CUDA device qualifier) to know if splitting an internal, externally_initialized global is valid for them. I'm guessing that it is safe for internal globals, but could anyone confirm this?
I've got a related patch up for review at D13343, the test in this patch depends on that change.