The attached patch fixes a bug I found in the C++ front end's handling of OpenACC data clauses. The problem here is that the C++ front end wraps the array bounds expressions in NON_LVALUE_EXPR tree nodes, and the code here (which appears to have been copied from similar code in the C front end) was failing to strip those before checking to see if they were INTEGER_CST nodes, etc. Sadly, I have no test case for this because it was only triggering an error in conjunction with some other OpenACC patches that are not yet on trunk, and the tree dumps don't show anything useful. I confirmed that the problem exists on trunk without those other patches by examining things in the debugger. This is the example I was using for my hand-testing: void f (float a[16][16], float b[16][16], float c[16][16]) { int i, j, k; #pragma acc kernels copyin(a[0:16][0:16], b[0:16][0:16]) copyout(c[0:16][0:16]) { for (i = 0; i < 16; i++) { for (j = 0; j < 16; j++) { float t = 0; for (k = 0; k < 16; k++) t += a[i][k] * b[k][j]; c[i][j] = t; } } } } Is this patch OK to commit now, or in Stage 1? -Sandra