public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/52970] New: OpenMP Scoping Incorrect for Arrays of Parameters
@ 2012-04-13  9:32 ian.bush at nag dot co.uk
  2015-10-20 16:02 ` [Bug fortran/52970] " dominiq at lps dot ens.fr
  2015-10-20 19:08 ` anlauf at gmx dot de
  0 siblings, 2 replies; 3+ messages in thread
From: ian.bush at nag dot co.uk @ 2012-04-13  9:32 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 52970
           Summary: OpenMP Scoping Incorrect for Arrays of Parameters
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: ian.bush@nag.co.uk


Created attachment 27148
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27148
Program showing the problem

Hi,

   when using default( none ) for the scoping of variables in an OpenMP
parallel region gfortran complains that arrays of Parameters need scoping when
they don't as they are named constants, not variables. Interestingly scalar
Parameters behave correctly (sorry for any line wrap issues):

Wot now? cat test_par_open.f90 
program test_par_opemp

!$ use omp_lib
implicit none 


integer :: kk, jx,jy,jz
Integer, Parameter :: nsbcll = 27

Integer, Dimension( 1:nsbcll ), Parameter :: &
  nix = (/ 0,  -1,-1,-1, 0, 0, 0, 1, 1, 1, -1,-1,-1, 0, 0, 1, 1, 1, -1,-1,-1,
0, 0, 0, 1, 1, 1 /) , &
  niy = (/ 0,  -1, 0, 1,-1, 0, 1,-1, 0, 1, -1, 0, 1,-1, 1,-1, 0, 1, -1, 0,
1,-1, 0, 1,-1, 0, 1 /) , &
  niz = (/ 0,  -1,-1,-1,-1,-1,-1,-1,-1,-1,  0, 0, 0, 0, 0, 0, 0, 0,  1, 1, 1,
1, 1, 1, 1, 1, 1 /)

  !$omp parallel do default(none)  private(kk,jx,jy,jz)
do kk=1, nsbcll

    jx=nix(kk)
    jy= niy(kk)
    jz=niz(kk)
end do 
 !$omp end parallel do 


end program
Wot now? ~/Downloads/gcc-4.8/bin/gfortran --version
GNU Fortran (GCC) 4.8.0 20120408 (experimental)
Copyright © 2012 Free Software Foundation, Inc.

GNU Fortran comes with NO WARRANTY, to the extent permitted by law.
You may redistribute copies of GNU Fortran
under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING

Wot now? ~/Downloads/gcc-4.8/bin/gfortran -fopenmp -W -Wall -pedantic -std=f95
test_par_open.f90 
test_par_open.f90: In function ‘test_par_opemp’:
test_par_open.f90:18:0: error: ‘nix’ not specified in enclosing parallel
test_par_open.f90:15:0: error: enclosing parallel
test_par_open.f90:19:0: error: ‘niy’ not specified in enclosing parallel
test_par_open.f90:15:0: error: enclosing parallel
test_par_open.f90:20:0: error: ‘niz’ not specified in enclosing parallel
test_par_open.f90:15:0: error: enclosing parallel

Note no error is generated for the scalar parameter nsbcll. This happens in
4.8.0, 4.6.2 and 4.5.2. Portland group, intel and oracle are all happy with the
above code.

The above code is attached,

Ian


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

* [Bug fortran/52970] OpenMP Scoping Incorrect for Arrays of Parameters
  2012-04-13  9:32 [Bug fortran/52970] New: OpenMP Scoping Incorrect for Arrays of Parameters ian.bush at nag dot co.uk
@ 2015-10-20 16:02 ` dominiq at lps dot ens.fr
  2015-10-20 19:08 ` anlauf at gmx dot de
  1 sibling, 0 replies; 3+ messages in thread
From: dominiq at lps dot ens.fr @ 2015-10-20 16:02 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52970

Dominique d'Humieres <dominiq at lps dot ens.fr> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |WAITING
   Last reconfirmed|                            |2015-10-20
     Ever confirmed|0                           |1

--- Comment #1 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
WORKSFORME from 4.8.5 up to trunk (6.0).


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

* [Bug fortran/52970] OpenMP Scoping Incorrect for Arrays of Parameters
  2012-04-13  9:32 [Bug fortran/52970] New: OpenMP Scoping Incorrect for Arrays of Parameters ian.bush at nag dot co.uk
  2015-10-20 16:02 ` [Bug fortran/52970] " dominiq at lps dot ens.fr
@ 2015-10-20 19:08 ` anlauf at gmx dot de
  1 sibling, 0 replies; 3+ messages in thread
From: anlauf at gmx dot de @ 2015-10-20 19:08 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52970

--- Comment #2 from Harald Anlauf <anlauf at gmx dot de> ---
(In reply to Dominique d'Humieres from comment #1)
> WORKSFORME from 4.8.5 up to trunk (6.0).

It looks like a dup of pr59488.


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

end of thread, other threads:[~2015-10-20 19:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-13  9:32 [Bug fortran/52970] New: OpenMP Scoping Incorrect for Arrays of Parameters ian.bush at nag dot co.uk
2015-10-20 16:02 ` [Bug fortran/52970] " dominiq at lps dot ens.fr
2015-10-20 19:08 ` anlauf at gmx dot de

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