This patch adds support for zero-length arrays in OpenACC data transfers. Previously, trying to use an array section with zero length would cause a fatal error at runtime. This patch requires that my other patch "OpenACC: Separate enter/exit data APIs" is already applied. Unfortunately, because the reference counting is handled by the code shared with OpenMP, and because the semantics there appear to be a little bit different (or broken?), I've been unable to get acc_is_present to return true for zero-length arrays created by pragmas (those created via acc_create are fine). That issue will require a another patch, probably with more invasive changes. The test case should cover all the main uses of zero-length arrays, and I've added an xfail message to highlight the known deficiency. OK for mainline (and backport to OG10)? Andrew