public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libgomp/59337] New: surprising OMP error message
@ 2013-11-29  8:14 Joost.VandeVondele at mat dot ethz.ch
  2013-11-29  9:23 ` [Bug libgomp/59337] " rguenth at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Joost.VandeVondele at mat dot ethz.ch @ 2013-11-29  8:14 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59337

            Bug ID: 59337
           Summary: surprising OMP error message
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libgomp
          Assignee: unassigned at gcc dot gnu.org
          Reporter: Joost.VandeVondele at mat dot ethz.ch
                CC: jakub at gcc dot gnu.org

> cat test.f90 
!$OMP ATOMIC
i=-i
END

> gfortran -fopenmp test.f90 
test.f90:2.2:

i=-i
  1
Error: !$OMP ATOMIC assignment operator must be +, *, -, /, .AND., .OR., .EQV.
or .NEQV. at (1)


The caret is pointing at a '-', and the error message is saying it must be one.
It appear that the proper way to write this is 

!$OMP ATOMIC
i=0-i
END

but that is not so obvious from the error messsage. Maybe it could be worded as
'... must be one of the binary operators '


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug libgomp/59337] surprising OMP error message
  2013-11-29  8:14 [Bug libgomp/59337] New: surprising OMP error message Joost.VandeVondele at mat dot ethz.ch
@ 2013-11-29  9:23 ` rguenth at gcc dot gnu.org
  2013-11-29 10:15 ` jakub at gcc dot gnu.org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2013-11-29  9:23 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59337

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
I wonder why atomic negate isn't possible - from a QOI perspective treating
it as 0 - i would be obvious, no?


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug libgomp/59337] surprising OMP error message
  2013-11-29  8:14 [Bug libgomp/59337] New: surprising OMP error message Joost.VandeVondele at mat dot ethz.ch
  2013-11-29  9:23 ` [Bug libgomp/59337] " rguenth at gcc dot gnu.org
@ 2013-11-29 10:15 ` jakub at gcc dot gnu.org
  2013-11-29 12:07 ` Joost.VandeVondele at mat dot ethz.ch
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-11-29 10:15 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59337

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
The standard doesn't allow it, and given the parsing complexities of the
atomics creating extensions there is IMHO undesirable, especially when it will
unlikely work with other compilers.

Because the standard explicitly lists the operators that can be used, I'd just
do s/must be /must be binary / in the message.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug libgomp/59337] surprising OMP error message
  2013-11-29  8:14 [Bug libgomp/59337] New: surprising OMP error message Joost.VandeVondele at mat dot ethz.ch
  2013-11-29  9:23 ` [Bug libgomp/59337] " rguenth at gcc dot gnu.org
  2013-11-29 10:15 ` jakub at gcc dot gnu.org
@ 2013-11-29 12:07 ` Joost.VandeVondele at mat dot ethz.ch
  2013-12-16 15:33 ` jakub at gcc dot gnu.org
  2013-12-16 15:40 ` jakub at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: Joost.VandeVondele at mat dot ethz.ch @ 2013-11-29 12:07 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59337

Joost VandeVondele <Joost.VandeVondele at mat dot ethz.ch> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |Joost.VandeVondele at mat dot ethz
                   |                            |.ch

--- Comment #3 from Joost VandeVondele <Joost.VandeVondele at mat dot ethz.ch> ---
(In reply to Jakub Jelinek from comment #2)
> creating extensions there is IMHO undesirable, especially when it
> will unlikely work with other compilers.

I agree with that, the compilers I tested all rejected this. I think it is a
flaw in the standard.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug libgomp/59337] surprising OMP error message
  2013-11-29  8:14 [Bug libgomp/59337] New: surprising OMP error message Joost.VandeVondele at mat dot ethz.ch
                   ` (2 preceding siblings ...)
  2013-11-29 12:07 ` Joost.VandeVondele at mat dot ethz.ch
@ 2013-12-16 15:33 ` jakub at gcc dot gnu.org
  2013-12-16 15:40 ` jakub at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-12-16 15:33 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59337

--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Author: jakub
Date: Mon Dec 16 15:33:42 2013
New Revision: 206017

URL: http://gcc.gnu.org/viewcvs?rev=206017&root=gcc&view=rev
Log:
    PR libgomp/59337
    * openmp.c (resolve_omp_atomic): Adjust error message.

    * gfortran.dg/gomp/pr59337.f90: New test.

Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/openmp.c
    trunk/gcc/testsuite/ChangeLog


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug libgomp/59337] surprising OMP error message
  2013-11-29  8:14 [Bug libgomp/59337] New: surprising OMP error message Joost.VandeVondele at mat dot ethz.ch
                   ` (3 preceding siblings ...)
  2013-12-16 15:33 ` jakub at gcc dot gnu.org
@ 2013-12-16 15:40 ` jakub at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-12-16 15:40 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59337

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |FIXED

--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Just use
!$OMP ATOMIC
i=i*-1
if you want to negate.


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2013-12-16 15:40 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-29  8:14 [Bug libgomp/59337] New: surprising OMP error message Joost.VandeVondele at mat dot ethz.ch
2013-11-29  9:23 ` [Bug libgomp/59337] " rguenth at gcc dot gnu.org
2013-11-29 10:15 ` jakub at gcc dot gnu.org
2013-11-29 12:07 ` Joost.VandeVondele at mat dot ethz.ch
2013-12-16 15:33 ` jakub at gcc dot gnu.org
2013-12-16 15:40 ` jakub at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).