https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98258
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |amonakov at gcc dot gnu.org, | |burnus at gcc dot gnu.org --- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> --- The error comes from config/nvptx/mkoffload.c if (!(fopenacc ^ fopenmp)) fatal_error (input_location, "either %<-fopenacc%> or %<-fopenmp%> " "must be set"); I guess this is because in order to compile NVPTX offloading OpenMP code one needs different Options (e.g. -mgomp ) than for OpenACC code, making NVPTX offloading incompatible between the two standards. I think you can use both if you disable nvptx offloading (e.g. through -foffload= option).