This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/65467] [libgomp] sorry, unimplemented: '_Atomic' with OpenMP
- From: "jeff.science at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 30 Aug 2016 18:30:55 +0000
- Subject: [Bug c/65467] [libgomp] sorry, unimplemented: '_Atomic' with OpenMP
- Auto-submitted: auto-generated
- References: <bug-65467-4@http.gcc.gnu.org/bugzilla/>
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.