I've committed this to the gomp4 branch. It extends the 'oacc function' attribute's dimension handling to deal with routines. With the latter we now use TREE_PURPOSE of the dimension list to indicate whether the routine may or may not spawn a partitioned loop on a particular axis. I had to tweak the validate_dims hook to tell it what the outermost such axis is (or -1 for a non-routine). The patch was complicated y the rather baroque handling of the routine directive in the C and C++ frontends. Now I see that handling is based on a misinterpretation of the specification. I'll clean that up shortly. nathan