From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19238 invoked by alias); 1 May 2009 18:23:58 -0000 Received: (qmail 19198 invoked by uid 48); 1 May 2009 18:23:43 -0000 Date: Fri, 01 May 2009 18:23:00 -0000 Subject: [Bug fortran/39995] New: Open MP compile fails with "internal compiler error" X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "mmsussman at gmail dot com" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2009-05/txt/msg00049.txt.bz2 The following error occurs on more than one system with more than one version of the compiler! I am running Ubuntu 8.04. The output of uname -a is: Linux ozhp 2.6.24-23-generic #1 SMP Wed Apr 1 21:47:28 UTC 2009 i686 GNU/Linux Command line: and its output: \gfortran -v -fopenmp simple.f90 -o junk Driving: gfortran -v -fopenmp simple.f90 -o junk -lgfortranbegin -lgfortran -lm -shared-libgcc Using built-in specs. Target: i486-linux-gnu Configured with: ../src/configure -v --enable-languages=c,c++,fortran,objc,obj-c++,treelang --prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --with-gxx-include-dir=/usr/include/c++/4.2 --program-suffix=-4.2 --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --enable-mpfr --enable-targets=all --enable-checking=release --build=i486-linux-gnu --host=i486-linux-gnu --target=i486-linux-gnu Thread model: posix gcc version 4.2.4 (Ubuntu 4.2.4-1ubuntu3) /usr/lib/gcc/i486-linux-gnu/4.2.4/f951 simple.f90 -quiet -dumpbase simple.f90 -mtune=generic -auxbase simple -version -fopenmp -fstack-protector -I /usr/lib/gcc/i486-linux-gnu/4.2.4/finclude -o /tmp/ccYjCwtk.s GNU F95 version 4.2.4 (Ubuntu 4.2.4-1ubuntu3) (i486-linux-gnu) compiled by GNU C version 4.2.4 (Ubuntu 4.2.4-1ubuntu3). GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 simple.f90: In function ‘MAIN__’: simple.f90:42: internal compiler error: in extract_omp_for_data, at omp-low.c:161 Please submit a full bug report, with preprocessed source if appropriate. See for instructions. For Debian GNU/Linux specific bug reporting instructions, see . The problem seems to be associated with one line in the contain-ed subroutine "display". The offending line is noted by a comment. The subroutine is never called. There is just this one file, named "simple.f90". program life implicit none integer, parameter :: r8=selected_real_kind(14),N=20,M=40,screen=6,esc=27 integer, parameter :: steps=1000000 logical, parameter :: doDisplay=.false. integer :: i,j,step,neighbors,ip1,im1,jp1,jm1,numGliders character(len=1) :: blank=' ',mark='X' character(len=1) :: world(0:N-1,0:M-1) integer :: iworld(0:N-1,0:M-1) ! initialize (vector statement) world(:,:)=blank ! set up a glider numGliders=0 DO j=1,M-4,5 DO i=0,N-4,5 world(i:i+2,j-1)=mark world(i,j)=mark world(i+1,j+1)=mark numGliders=numGliders+1 ENDDO ENDDO where(world==mark) iworld=1 elsewhere iworld=0 endwhere print *,'starting with ',numGliders,' gliders.' do step=1,steps world=blank !$omp parallel do private(i,jm1,jp1,im1,ip1,neighbors) do j=M-1,0,-1 jm1=modulo(j-1,M) jp1=modulo(j+1,M) do i=N-1,0,-1 im1=modulo(i-1,N) ip1=modulo(i+1,N) neighbors= iworld(im1,jm1)+iworld(im1,j)+iworld(im1,jp1) & & + iworld(i,jm1) +iworld(i,jp1) & & + iworld(ip1,jm1)+iworld(ip1,j)+iworld(ip1,jp1) if(iworld(i,j)==0) then if(neighbors==3)world(i,j)=mark else if( neighbors==2 .or. neighbors==3 )world(i,j)=mark endif enddo enddo !$omp end parallel do where(world==mark) iworld=1 elsewhere iworld=0 endwhere enddo print *,' ended with ',numGliders,' gliders after',steps,' steps.' CONTAINS SUBROUTINE display(A) IMPLICIT NONE INTEGER,INTENT(IN) :: A(:,:) CHARACTER(LEN=40) :: fmt CHARACTER(LEN=1),ALLOCATABLE :: Acharac(:,:) DO i=M,1,-1 ! comment out the following statement and the program compiles WRITE(screen,fmt)i-1,(Acharac(i,j),j=1,N) ENDDO END SUBROUTINE display end program life -- Summary: Open MP compile fails with "internal compiler error" Product: gcc Version: 4.2.4 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: mmsussman at gmail dot com GCC build triplet: i486-linux-gnu GCC host triplet: i486-linux-gnu GCC target triplet: i486-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39995