On Wed, Jul 17, 2019 at 10:06:07PM +0100, Kwok Cheung Yeung wrote: > --- a/gcc/omp-oacc-kernels.c > +++ b/gcc/omp-oacc-kernels.c > @@ -30,6 +30,7 @@ along with GCC; see the file COPYING3. If not see > #include "backend.h" > #include "target.h" > #include "tree.h" > +#include "cp/cp-tree.h"
No, you certainly don't want to do this. Use langhooks if needed, though that can be only for stuff done before IPA. After IPA, because of LTO FE, you must not rely on anything that is not in the IL generically. > + /* Build the gang-single region. */ > + gimple *single_region > + = gimple_build_omp_target ( > + NULL, > + GF_OMP_TARGET_KIND_OACC_PARALLEL_KERNELS_GANG_SINGLE, > + gang_single_clause); Formatting, both lack of tab uses, and ( at the end of line is very ugly. Either try to use shorter GF_OMP_TARGET_KIND names, or say set a local variable to that value and use that as an argument to the function to make it shorter and more readable. Jakub