This patch backports the recent firstprivate subarray changes I've made to trunk. Gomp4 has preliminary support for c++ reference types, so I had to make some adjustments to the original patch to get this.C and non-scalar-data.C working. Those changes were relatively minor, so I'll bring them to trunk after I address the remarks Thomas made on my original patch. Thomas, I decided to xfail a bunch of kernels tests in gomp4 instead of removing them so that we can have a better record on what changed. One of use should investigate why the alias analysis doesn't like the firstprivate pointer changes. Cesar