https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97070
--- Comment #3 from Ioannis E. Venetis <venetis at ceid dot upatras.gr> --- This is weird. Just downloaded gcc from git and built version 11.0 $ /home/venetis/apps/gcc-20200928/bin/gcc -v Using built-in specs. COLLECT_GCC=/home/venetis/apps/gcc-20200928/bin/gcc COLLECT_LTO_WRAPPER=/home/venetis/apps/gcc-20200928/libexec/gcc/x86_64-pc-linux-gnu/11.0.0/lto-wrapper OFFLOAD_TARGET_NAMES=nvptx-none Target: x86_64-pc-linux-gnu Configured with: ../gcc-20200928/configure --enable-offload-targets=nvptx-none --with-cuda-driver-include=/usr/local/cuda/include --with-cuda-driver-lib=/usr/local/cuda/lib64 --disable-bootstrap --disable-multilib --enable-languages=c,c++,fortran,lto --prefix=/home/venetis/apps/gcc-20200928 Thread model: posix Supported LTO compression algorithms: zlib gcc version 11.0.0 20200928 (experimental) (GCC) I am still getting the wrong results with OpenACC. I can see three possibilities. 1) I build gcc the wrong way. I have attached the script I am using to build gcc. It is a slightly modified version of what I found here: https://gist.github.com/matthiasdiener/e318e7ed8815872e9d29feb3b9c8413f I have created manually a tarball of the code downloaded from git so as to make minimal changes in the script I had. 2) The wrong run-time libraries are used during execution of the example, since gcc is installed in a non-default path. I have tried with and without setting: LD_LIBRARY_PATH=/home/venetis/apps/gcc-20200928/lib:/home/venetis/apps/gcc-20200928/lib64 Unfortunately I get wrong results in both cases. 3) Wrong nvptx tools and libraries are used during compilation of the example, as my system (Ubuntu 16.04.7 LTS) has also the corresponding packages for gcc 9.3.0 installed. How can I make certain that my compilation and execution of the example are using all tools and libraries from my custom build? PS: As a side note, I tried OpenACC with nvfortran 20.7 from NVidia HPC SDK 20.7 and I get the correct results for the example.