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.

[EMAIL PROTECTED] $ 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.
[EMAIL PROTECTED] $ 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
[EMAIL PROTECTED] $ 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

Reply via email to