public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/35786]  New: OpenMP Fortran PRIVATE on parameter gives error in gfc_finish_var_decl
@ 2008-04-01  8:10 J dot Hogg at rl dot ac dot uk
  2008-04-01 13:23 ` [Bug fortran/35786] " burnus at gcc dot gnu dot org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: J dot Hogg at rl dot ac dot uk @ 2008-04-01  8:10 UTC (permalink / raw)
  To: gcc-bugs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1594 bytes --]

Using the parameter ONE in the PRIVATE stanza of the parallel do in the below
code produces the shown error. This error only occurs if the subroutine is in a
module file.

user@host $ gfortran-4.3 -fopenmp -c test.f90
test.f90: In function ‘test’:
test.f90:8: internal compiler error: in gfc_finish_var_decl, at
fortran/trans-decl.c:510
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
user@host $ cat test.f90
module testmod
  implicit none

  real, parameter :: one = 1.0

contains

subroutine test
    integer i

    real, dimension(4) :: a = (/ 1, 2, 3, 4 /)
    real, dimension(4) :: b

    !$OMP PARALLEL DO PRIVATE(I, ONE)
    do i = 1,size(a)
      b(i) = one*a(i)
    end do
    !$OMP END PARALLEL DO

    print *, "b = ", b
end subroutine test
end module
user@host $ gfortran-4.3 -v
Using built-in specs.
Target: x86_64-unknown-linux-gnu
Configured with: ../configure --program-suffix=-4.3
Thread model: posix
gcc version 4.3.0 (GCC)


-- 
           Summary: OpenMP Fortran PRIVATE on parameter gives error in
                    gfc_finish_var_decl
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: J dot Hogg at rl dot ac dot uk
 GCC build triplet: x86_64-unknown-linux-gnu
  GCC host triplet: x86_64-unknown-linux-gnu
GCC target triplet: x86_64-unknown-linux-gnu


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


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

end of thread, other threads:[~2008-04-03 21:26 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-04-01  8:10 [Bug fortran/35786] New: OpenMP Fortran PRIVATE on parameter gives error in gfc_finish_var_decl J dot Hogg at rl dot ac dot uk
2008-04-01 13:23 ` [Bug fortran/35786] " burnus at gcc dot gnu dot org
2008-04-01 14:14 ` J dot Hogg at rl dot ac dot uk
2008-04-03 14:58 ` jakub at gcc dot gnu dot org
2008-04-03 21:02 ` jakub at gcc dot gnu dot org
2008-04-03 21:22 ` jakub at gcc dot gnu dot org
2008-04-03 21:26 ` jakub 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).