This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/48117] New: ICE: OpenMP; in build_int_cst_wide, at tree.c:1178
- From: "longb at cray dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 14 Mar 2011 18:30:21 +0000
- Subject: [Bug fortran/48117] New: ICE: OpenMP; in build_int_cst_wide, at tree.c:1178
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48117
Summary: ICE: OpenMP; in build_int_cst_wide, at tree.c:1178
Product: gcc
Version: 4.5.2
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: longb@cray.com
> cat test.f90
MODULE mo_real_timer
IMPLICIT NONE
PRIVATE
PUBLIC :: get_new_timer
INTEGER, PARAMETER :: timer_max = 1024
INTEGER :: top_timer = 0
! shared part of timer
TYPE srt_type
LOGICAL :: reserved ! usage flag
CHARACTER(len=80) :: text ! description of timer
END TYPE srt_type
! thread private part of timer
TYPE(srt_type), PARAMETER :: srt_init = srt_type(.FALSE., 'noname')
TYPE(srt_type) :: srt(timer_max)
CONTAINS
SUBROUTINE get_new_timer(itimer, text)
INTEGER, VOLATILE, INTENT(inout):: itimer
! itimer should not be threadprivate
CHARACTER(len=*), INTENT(in), OPTIONAL :: text
! works like new_timer(),
! but can be called from within a parallel region
!$OMP MASTER
IF (PRESENT(text)) srt(top_timer)%text = adjustl(text)
!$OMP END MASTER
END SUBROUTINE get_new_timer
END MODULE mo_real_timer
> gfortran -c -O2 test.f90
> gfortran -c -fopenmp test.f90
> gfortran -c -fopenmp -O2 test.f90
test.f90: In function 'get_new_timer':
test.f90:22:0: internal compiler error: in build_int_cst_wide, at tree.c:1178
...
> gfortran -v
Using built-in specs.
COLLECT_GCC=/opt/gcc/4.5.2/bin/../snos/bin/gfortran
...
Thread model: posix
gcc version 4.5.2 20101216 (Cray Inc.) (GCC)
>
Compiles OK with either -O2 or -fopenmp, but ICE when both used together.