public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/39995]  New: Open MP compile fails with "internal compiler error"
@ 2009-05-01 18:23 mmsussman at gmail dot com
  2009-05-01 18:26 ` [Bug fortran/39995] " mmsussman at gmail dot com
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: mmsussman at gmail dot com @ 2009-05-01 18:23 UTC (permalink / raw)
  To: gcc-bugs

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 <URL:http://gcc.gnu.org/bugs.html> for instructions.
For Debian GNU/Linux specific bug reporting instructions,
see <URL:file:///usr/share/doc/gcc-4.2/README.Bugs>.

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


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

* [Bug fortran/39995] Open MP compile fails with "internal compiler error"
  2009-05-01 18:23 [Bug fortran/39995] New: Open MP compile fails with "internal compiler error" mmsussman at gmail dot com
@ 2009-05-01 18:26 ` mmsussman at gmail dot com
  2009-05-01 19:29 ` kargl at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: mmsussman at gmail dot com @ 2009-05-01 18:26 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from mmsussman at gmail dot com  2009-05-01 18:26 -------
Created an attachment (id=17789)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=17789&action=view)
copy of original source code.


-- 


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


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

* [Bug fortran/39995] Open MP compile fails with "internal compiler error"
  2009-05-01 18:23 [Bug fortran/39995] New: Open MP compile fails with "internal compiler error" mmsussman at gmail dot com
  2009-05-01 18:26 ` [Bug fortran/39995] " mmsussman at gmail dot com
@ 2009-05-01 19:29 ` kargl at gcc dot gnu dot org
  2009-05-01 21:39 ` msussman at verizon dot net
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: kargl at gcc dot gnu dot org @ 2009-05-01 19:29 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from kargl at gcc dot gnu dot org  2009-05-01 19:29 -------
(In reply to comment #1)
> Created an attachment (id=17789)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=17789&action=view) [edit]
> copy of original source code.
> 

Works for me with

REMOVE:kargl[208] gfc43 --version
GNU Fortran (GCC) 4.3.3 20081120 (prerelease)
REMOVE:kargl[209] gfc4x --version
GNU Fortran (GCC) 4.5.0 20090426 (experimental) [trunk revision 140508]

What 'other versions of the compiler' does it fail with?


-- 


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


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

* [Bug fortran/39995] Open MP compile fails with "internal compiler error"
  2009-05-01 18:23 [Bug fortran/39995] New: Open MP compile fails with "internal compiler error" mmsussman at gmail dot com
  2009-05-01 18:26 ` [Bug fortran/39995] " mmsussman at gmail dot com
  2009-05-01 19:29 ` kargl at gcc dot gnu dot org
@ 2009-05-01 21:39 ` msussman at verizon dot net
  2009-05-01 21:50 ` kargl at gcc dot gnu dot org
  2009-05-05  8:04 ` [Bug fortran/39995] [4.1/4.2 only] " fxcoudert at gcc dot gnu dot org
  4 siblings, 0 replies; 6+ messages in thread
From: msussman at verizon dot net @ 2009-05-01 21:39 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from msussman at verizon dot net  2009-05-01 21:39 -------
Subject: Re:  Open MP compile fails with "internal
        compiler error"

On Fri, 2009-05-01 at 19:29 +0000, kargl at gcc dot gnu dot org wrote:
> 
> ------- Comment #2 from kargl at gcc dot gnu dot org  2009-05-01 19:29 -------
> (In reply to comment #1)
> > Created an attachment (id=17789)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=17789&action=view)
>  --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=17789&action=view) [edit]
> > copy of original source code.
> > 
> 
> Works for me with
> 
> REMOVE:kargl[208] gfc43 --version
> GNU Fortran (GCC) 4.3.3 20081120 (prerelease)
> REMOVE:kargl[209] gfc4x --version
> GNU Fortran (GCC) 4.5.0 20090426 (experimental) [trunk revision 140508]
> 
> What 'other versions of the compiler' does it fail with?
> 
I am sorry, I should have specified:

gcc version 4.1.2 20071124 (Red Hat 4.1.2-42)

This is running on a system at the Pittsburgh Supercomputer Center
(warhol.psc.edu) and I am not sure what the Linux release is.

[Please excuse me if I have responded to the wrong address, this is the
first time I have used bugzilla.]


-- 


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


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

* [Bug fortran/39995] Open MP compile fails with "internal compiler error"
  2009-05-01 18:23 [Bug fortran/39995] New: Open MP compile fails with "internal compiler error" mmsussman at gmail dot com
                   ` (2 preceding siblings ...)
  2009-05-01 21:39 ` msussman at verizon dot net
@ 2009-05-01 21:50 ` kargl at gcc dot gnu dot org
  2009-05-05  8:04 ` [Bug fortran/39995] [4.1/4.2 only] " fxcoudert at gcc dot gnu dot org
  4 siblings, 0 replies; 6+ messages in thread
From: kargl at gcc dot gnu dot org @ 2009-05-01 21:50 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from kargl at gcc dot gnu dot org  2009-05-01 21:50 -------
(In reply to comment #3)> 
> On Fri, 2009-05-01 at 19:29 +0000, kargl at gcc dot gnu dot org wrote:
> > 
> > > Created an attachment (id=17789)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=17789&action=view) [edit]
> >  --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=17789&action=view)
> > > copy of original source code.
> > > 
> > 
> > Works for me with
> > 
> > REMOVE:kargl[208] gfc43 --version
> > GNU Fortran (GCC) 4.3.3 20081120 (prerelease)
> > REMOVE:kargl[209] gfc4x --version
> > GNU Fortran (GCC) 4.5.0 20090426 (experimental) [trunk revision 140508]
> > 
> > What 'other versions of the compiler' does it fail with?
> > 
> I am sorry, I should have specified:
> 
> gcc version 4.1.2 20071124 (Red Hat 4.1.2-42)
> 
> This is running on a system at the Pittsburgh Supercomputer Center
> (warhol.psc.edu) and I am not sure what the Linux release is.

You should ask the PSC to upgrade to at least the latest 4.3.x
release and preferably to the new 4.4.0 release.  Too many bugs
and features have been added to list here.


-- 


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


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

* [Bug fortran/39995] [4.1/4.2 only] Open MP compile fails with "internal compiler error"
  2009-05-01 18:23 [Bug fortran/39995] New: Open MP compile fails with "internal compiler error" mmsussman at gmail dot com
                   ` (3 preceding siblings ...)
  2009-05-01 21:50 ` kargl at gcc dot gnu dot org
@ 2009-05-05  8:04 ` fxcoudert at gcc dot gnu dot org
  4 siblings, 0 replies; 6+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2009-05-05  8:04 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from fxcoudert at gcc dot gnu dot org  2009-05-05 08:04 -------
(In reply to comment #3)
> gcc version 4.1.2 20071124 (Red Hat 4.1.2-42)

Well, your original bugreport is with gfortran 4.2.4, but anyway: both the 4.1
and 4.2 branches have been closed, so this won't be fixed. Your option is to
upgrade (which can be done locally, no need to be superuser).


-- 

fxcoudert at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |WONTFIX
            Summary|Open MP compile fails with  |[4.1/4.2 only] Open MP
                   |"internal compiler error"   |compile fails with "internal
                   |                            |compiler error"


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


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

end of thread, other threads:[~2009-05-05  8:04 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-05-01 18:23 [Bug fortran/39995] New: Open MP compile fails with "internal compiler error" mmsussman at gmail dot com
2009-05-01 18:26 ` [Bug fortran/39995] " mmsussman at gmail dot com
2009-05-01 19:29 ` kargl at gcc dot gnu dot org
2009-05-01 21:39 ` msussman at verizon dot net
2009-05-01 21:50 ` kargl at gcc dot gnu dot org
2009-05-05  8:04 ` [Bug fortran/39995] [4.1/4.2 only] " fxcoudert 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).