[Bug c/65467] [libgomp] sorry, unimplemented: '_Atomic' with OpenMP
jeff.science at gmail dot com
gcc-bugzilla@gcc.gnu.org
Tue Aug 30 18:31:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65467
--- Comment #10 from Jeff Hammond <jeff.science at gmail dot com> ---
(In reply to Andrew Pinski from comment #9)
> (In reply to Jeff Hammond from comment #8)
> > So GCC refuses to compile any code that potentially includes undefined
> > behavior?
>
> Semantics not being defined is different than undefined behavior.
GCC happily compiles a C++11 OpenMP program that is equivalent to the C11
OpenMP program that it will not compile.
GCC happily compiles the following Fortran 2008 OpenMP program that actually
does something that could be considered undefined.
$ gfortran-6 -fopenmp -std=f2008 -fcoarray=single caf-openmp.f
$ cat caf-openmp.f
program atomic
use iso_fortran_env
use omp_lib
implicit none
integer :: i
integer(atomic_int_kind) :: atom[*]
call atomic_define (atom[1], this_image())
!$OMP ATOMIC
atom[1] = -this_image()
end program atomic
If you want to break user experience for OpenMP programmers, please do it
systematically.
More information about the Gcc-bugs
mailing list