https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98258
--- Comment #7 from Chinoune <mehdi.chinoune at hotmail dot com> --- $ gfortran -O3 -fopenmp -fopenacc -foffload=-fno-openmp bug_omp_acc.f90 -o test.x mkoffload: fatal error: either '-fopenacc' or '-fopenmp' must be set compilation terminated. lto-wrapper: fatal error: /usr/lib/gcc/x86_64-linux-gnu/9//accel/nvptx-none/mkoffload returned 1 exit status compilation terminated. /usr/bin/ld: error: lto-wrapper failed collect2: error: ld returned 1 exit status $ gfortran-10 -O3 -fopenmp -fopenacc -foffload=-fno-openmp bug_omp_acc.f90 -o test.x mkoffload: fatal error: either '-fopenacc' or '-fopenmp' must be set compilation terminated. lto-wrapper: fatal error: /usr/lib/gcc/x86_64-linux-gnu/10//accel/nvptx-none/mkoffload returned 1 exit status compilation terminated. /usr/bin/ld: error: lto-wrapper failed collect2: error: ld returned 1 exit status $ gfortran-10 -O3 -fopenmp -fopenacc -c bug_omp_acc.f90 $ gfortran-10 bug_omp_acc.o -lgomp -o test.x mkoffload: fatal error: either '-fopenacc' or '-fopenmp' must be set compilation terminated. lto-wrapper: fatal error: /usr/lib/gcc/x86_64-linux-gnu/10//accel/nvptx-none/mkoffload returned 1 exit status compilation terminated. /usr/bin/ld: error: lto-wrapper failed collect2: error: ld returned 1 exit status Please, stop suggesting untested workarounds.