public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/54715] New: !$OMP SINGLE NOWAIT gives compiler error
@ 2012-09-26 11:51 arno.m at gmx dot at
  2012-09-26 12:33 ` [Bug fortran/54715] " jakub at gcc dot gnu.org
  2012-09-26 13:24 ` arno.m at gmx dot at
  0 siblings, 2 replies; 3+ messages in thread
From: arno.m at gmx dot at @ 2012-09-26 11:51 UTC (permalink / raw)
  To: gcc-bugs


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

             Bug #: 54715
           Summary: !$OMP SINGLE NOWAIT gives compiler error
    Classification: Unclassified
           Product: gcc
           Version: 4.7.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: arno.m@gmx.at


Dear all,

the following code produces a compiler error, although it should not:

===================================================
program debug
use omp_lib
!$omp parallel
!$omp single nowait
  write(*,*) 'bla'
!$omp end single
!$omp end parallel
end program
===================================================

Compiling:

===================================================
$ gfortran -fopenmp -lgomp -o debug debug.f90
debug.f90:4.6:

!$omp single nowait
      1
Error: Unclassifiable OpenMP directive at (1)
debug.f90:6.16:

!$omp end single
                1
Error: Unexpected !$OMP END SINGLE statement at (1)
===================================================

Without the nowait everything works nicely. The same code (with nowait) works
with C++ without any problems.

I tried it on the following machines:

1.) Fedora 15
===================================================
$ gfortran -v
Using built-in specs.
COLLECT_GCC=gfortran
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/4.6.3/lto-wrapper
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
--infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla
--enable-bootstrap --enable-shared --enable-threads=posix
--enable-checking=release --with-system-zlib --enable-__cxa_atexit
--disable-libunwind-exceptions --enable-gnu-unique-object
--enable-linker-build-id
--enable-languages=c,c++,objc,obj-c++,java,fortran,ada,go,lto --enable-plugin
--enable-java-awt=gtk --disable-dssi
--with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre
--enable-libgcj-multifile --enable-java-maintainer-mode
--with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib
--with-ppl --with-cloog --with-tune=generic --with-arch_32=i686
--build=x86_64-redhat-linux
Thread model: posix
gcc version 4.6.3 20120306 (Red Hat 4.6.3-2) (GCC) 
===================================================

2.) Debian (I think Wheezy)
===================================================
$ gfortran -v
Using built-in specs.
COLLECT_GCC=gfortran
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.7/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 4.7.1-7'
--with-bugurl=file:///usr/share/doc/gcc-4.7/README.Bugs
--enable-languages=c,c++,go,fortran,objc,obj-c++ --prefix=/usr
--program-suffix=-4.7 --enable-shared --enable-linker-build-id
--with-system-zlib --libexecdir=/usr/lib --without-included-gettext
--enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.7
--libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu
--enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object
--enable-plugin --enable-objc-gc --with-arch-32=i586 --with-tune=generic
--enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu
--target=x86_64-linux-gnu
Thread model: posix
gcc version 4.7.1 (Debian 4.7.1-7) 
===================================================

Best regards,
Arno


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

* [Bug fortran/54715] !$OMP SINGLE NOWAIT gives compiler error
  2012-09-26 11:51 [Bug fortran/54715] New: !$OMP SINGLE NOWAIT gives compiler error arno.m at gmx dot at
@ 2012-09-26 12:33 ` jakub at gcc dot gnu.org
  2012-09-26 13:24 ` arno.m at gmx dot at
  1 sibling, 0 replies; 3+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-09-26 12:33 UTC (permalink / raw)
  To: gcc-bugs


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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
                 CC|                            |jakub at gcc dot gnu.org
         Resolution|                            |INVALID

--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-09-26 12:32:56 UTC ---
That is correct, what you are trying to compile is not valid OpenMP.
You want
!$omp single
  write(*,*) 'bla'
!$omp end single nowait
as in Fortran nowait is end_clause, not clause.  See e.g. OpenMP 3.1, 2.5.3.


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

* [Bug fortran/54715] !$OMP SINGLE NOWAIT gives compiler error
  2012-09-26 11:51 [Bug fortran/54715] New: !$OMP SINGLE NOWAIT gives compiler error arno.m at gmx dot at
  2012-09-26 12:33 ` [Bug fortran/54715] " jakub at gcc dot gnu.org
@ 2012-09-26 13:24 ` arno.m at gmx dot at
  1 sibling, 0 replies; 3+ messages in thread
From: arno.m at gmx dot at @ 2012-09-26 13:24 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #2 from Arno M <arno.m at gmx dot at> 2012-09-26 13:23:48 UTC ---
Ah that's where the mistake is coming from. Thank you for your help.


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

end of thread, other threads:[~2012-09-26 13:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-09-26 11:51 [Bug fortran/54715] New: !$OMP SINGLE NOWAIT gives compiler error arno.m at gmx dot at
2012-09-26 12:33 ` [Bug fortran/54715] " jakub at gcc dot gnu.org
2012-09-26 13:24 ` arno.m at gmx dot at

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).