public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/30676]  New: Incomplete warning on non-conforming code with -fopenmp
@ 2007-02-02  6:44 spam dot brian dot taylor at gmail dot com
  2007-02-16 16:10 ` [Bug fortran/30676] " fxcoudert at gcc dot gnu dot org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: spam dot brian dot taylor at gmail dot com @ 2007-02-02  6:44 UTC (permalink / raw)
  To: gcc-bugs

Compiling the following invalid OpenMP program with -Wall results in no warning
message at -O0 and a poorly-formed warning message at -O1 or higher.  No
warning is printed at any optimization level if compiled without -Wall.

The program violates the constraint on allocatable arrays in private clauses
given near the end of section 2.8.3.3 of the OpenMP API manual v2.5:
allocatable arrays in private clauses must be unallocated on entry and exit to
the parallel region.  The Fortran frontend should detect this violation and
issue a fully-formed warning (or error) regardless of optimization level.

taylor@host $ cat test.f 
      program test
      integer :: i
      integer, allocatable :: array(:)
      allocate(array(200))
!$omp parallel do private(i,array)
      do i = 1, 100
        array(i) = i
      end do
      end program

taylor@host $ gfortran -Wall -O0 -fopenmp test.f -o test

taylor@host $ gfortran -Wall -O1 -fopenmp test.f -o test
'array.dim[0].stridetest.f: In function 'MAIN__.omp_fn.0':
test.f:5: warning: ' is used uninitialized in this function
'array.offsettest.f:5: warning: ' is used uninitialized in this function

taylor@host $ gfortran -O1 -fopenmp test.f -o test

taylor@host $ gfortran -v
Using built-in specs.
Target: powerpc-apple-darwin8.8.0
Configured with: ../gcc-4.3-20061223/configure --enable-languages=fortran
Thread model: posix
gcc version 4.3.0 20061223 (experimental)


-- 
           Summary: Incomplete warning on non-conforming code with -fopenmp
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: spam dot brian dot taylor at gmail dot com
  GCC host triplet: powerpc-apple-darwin8.8.0
GCC target triplet: powerpc-apple-darwin8.8.0


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


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

* [Bug fortran/30676] Incomplete warning on non-conforming code with -fopenmp
  2007-02-02  6:44 [Bug fortran/30676] New: Incomplete warning on non-conforming code with -fopenmp spam dot brian dot taylor at gmail dot com
@ 2007-02-16 16:10 ` fxcoudert at gcc dot gnu dot org
  2007-06-25 20:35 ` dfranke at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2007-02-16 16:10 UTC (permalink / raw)
  To: gcc-bugs



-- 

fxcoudert at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
           Keywords|                            |diagnostic
   Last reconfirmed|0000-00-00 00:00:00         |2007-02-16 16:09:51
               date|                            |


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


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

* [Bug fortran/30676] Incomplete warning on non-conforming code with -fopenmp
  2007-02-02  6:44 [Bug fortran/30676] New: Incomplete warning on non-conforming code with -fopenmp spam dot brian dot taylor at gmail dot com
  2007-02-16 16:10 ` [Bug fortran/30676] " fxcoudert at gcc dot gnu dot org
@ 2007-06-25 20:35 ` dfranke at gcc dot gnu dot org
  2008-03-10 15:10 ` jakub at gcc dot gnu dot org
  2010-01-17 21:48 ` kargl at gcc dot gnu dot org
  3 siblings, 0 replies; 5+ messages in thread
From: dfranke at gcc dot gnu dot org @ 2007-06-25 20:35 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from dfranke at gcc dot gnu dot org  2007-06-25 20:35 -------
Currently, there is no means to warn about the usage of (un-)allocated
allocatables. See also: PR20520.


-- 

dfranke at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dfranke at gcc dot gnu dot
                   |                            |org


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


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

* [Bug fortran/30676] Incomplete warning on non-conforming code with -fopenmp
  2007-02-02  6:44 [Bug fortran/30676] New: Incomplete warning on non-conforming code with -fopenmp spam dot brian dot taylor at gmail dot com
  2007-02-16 16:10 ` [Bug fortran/30676] " fxcoudert at gcc dot gnu dot org
  2007-06-25 20:35 ` dfranke at gcc dot gnu dot org
@ 2008-03-10 15:10 ` jakub at gcc dot gnu dot org
  2010-01-17 21:48 ` kargl at gcc dot gnu dot org
  3 siblings, 0 replies; 5+ messages in thread
From: jakub at gcc dot gnu dot org @ 2008-03-10 15:10 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from jakub at gcc dot gnu dot org  2008-03-10 15:10 -------
Note that with OpenMP 3.0 this is valid code.


-- 


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


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

* [Bug fortran/30676] Incomplete warning on non-conforming code with -fopenmp
  2007-02-02  6:44 [Bug fortran/30676] New: Incomplete warning on non-conforming code with -fopenmp spam dot brian dot taylor at gmail dot com
                   ` (2 preceding siblings ...)
  2008-03-10 15:10 ` jakub at gcc dot gnu dot org
@ 2010-01-17 21:48 ` kargl at gcc dot gnu dot org
  3 siblings, 0 replies; 5+ messages in thread
From: kargl at gcc dot gnu dot org @ 2010-01-17 21:48 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from kargl at gcc dot gnu dot org  2010-01-17 21:48 -------
http://gcc.gnu.org/news.html

shows

June 6, 2008
    An implementation of the OpenMP v3.0 parallel programming interface for C,
C++ and Fortran has been added. Code was contributed by Jakub Jelinek, Richard
Henderson and Ulrich Drepper of Red Hat, Inc.

A scan of the gcc.info files shows that the -fopenmp option cannot select
the older 2.5 spec, so only the 3.0 spec is now relevant.  Comment #3
states the code is valid under 3.0 and indeed it compiles with both 
4.4.3 and 4.5.0.

I'm closing this with WONTFIX and setting the target to 4.4.3.


-- 

kargl at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |WONTFIX
   Target Milestone|---                         |4.4.3


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


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

end of thread, other threads:[~2010-01-17 21:48 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-02  6:44 [Bug fortran/30676] New: Incomplete warning on non-conforming code with -fopenmp spam dot brian dot taylor at gmail dot com
2007-02-16 16:10 ` [Bug fortran/30676] " fxcoudert at gcc dot gnu dot org
2007-06-25 20:35 ` dfranke at gcc dot gnu dot org
2008-03-10 15:10 ` jakub at gcc dot gnu dot org
2010-01-17 21:48 ` kargl at gcc dot gnu dot 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).