[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

fortran compiler bug



We seem to be having issues getting a bug registered....the site listed
is somewhat obtuse with its instructions...

:(

Eg

======
8><---
======

> How did it go?

Internal compiler error on my favourite program for timing, which
compiles and runs with 4 other compilers (mahoe f95 and nagf95, and Sun
f95 and g95), and I don't understand the detail of how gfortran wants
bugs reported :-( because I don't know what the bug-reporting web site
    http://gcc.gnu.org/bugzilla/enter_bug.cgi
means by host,target and build triplets.

The program:

jabber:~/Jfh% cat testspeed.f90
INTEGER,PARAMETER::DP=KIND(1.0d0)
REAL(DP):: y(1000,1000),x(1000)=(/(i*7,i=1,1000)/)
tstart = 0.0
CALL timeit(6,' ',tstart,CPU)
DO i=1,1000
    y(:,i) = x**(1/3.d0)/i
END DO
PRINT*,'Check:
y(10,100)=(70.**(1/3.)/100)?',y(10,100),70.d0**(1/3.d0)/100
CALL timeit(6,'y(:,i) stuff',tstart,CPU) DO i = 1,1000
    y(i,:) = x**(1/3.d0)/i
END DO
PRINT*,'Check:
y(100,10)=70.**(1/3.)/100)?',y(100,10),70.d0**(1/3.d0)/100
CALL timeit(6,'y(i,:) stuff',tstart,CPU) END
   SUBROUTINE timeit(    iunit,stuff    ,tstart,CPU) ! Needs f95
     INTEGER,INTENT(IN)::iunit
     CHARACTER,INTENT(IN)::    stuff*(*)
     REAL,INTENT(INOUT)  ::              tstart
     REAL,INTENT(OUT)    ::                     CPU
! Make tstart = 0.0 before first call, and stuff = ' ' at the first
call.
! Writes to iunit CPU time since last call if stuff non-blank and tstart
! is not altered outside timeit calls . The character string stuff
should ! describe what has just been done after the first call.
     REAL tstop
     CALL CPU_TIME(tstop)
     CPU = tstop - tstart
     IF(TRIM(stuff)/='') WRITE(iunit,"(3A,F0.3,A)") &
          ' CPU time taken for ',stuff,' was ',CPU,' sec.'
     tstart = tstop
   END SUBROUTINE timeit

What happened at compile time:

jabber:~/Jfh% gfortran -v testspeed.f90
Driving: gfortran -v testspeed.f90 -lgfortranbegin -lgfortran -lm
-shared-libgcc Using built-in specs.
Target: i486-linux-gnu
Configured with: ../src/configure -v
--enable-languages=c,c++,java,f95,objc,ada,treelang --prefix=/usr
--enable-shared --with-system-zlib --libexecdir=/usr/lib
--without-included-gettext --enable-threads=posix --enable-nls
--program-suffix=-4.0 --enable-__cxa_atexit
--enable-libstdcxx-allocator=mt --enable-clocale=gnu
--enable-libstdcxx-debug --enable-java-gc=boehm --enable-java-awt=gtk
--enable-gtk-cairo
--with-java-home=/usr/lib/jvm/java-1.4.2-gcj-4.0-1.4.2.0/jre
--enable-mpfr --disable-werror --enable-checking=release i486-linux-gnu
Thread model: posix gcc version 4.0.2 (Debian 4.0.2-2)
  /usr/lib/gcc/i486-linux-gnu/4.0.2/f951 testspeed.f90 -quiet -dumpbase
testspeed.f90 -mtune=i486 -auxbase testspeed -version -o /tmp/ccUWaMnT.s
GNU F95 version 4.0.2 (Debian 4.0.2-2) (i486-linux-gnu)
         compiled by GNU C version 4.0.2 (Debian 4.0.2-2).
GGC heuristics: --param ggc-min-expand=90 --param
ggc-min-heapsize=113003
testspeed.f90:0: internal compiler error: Segmentation fault 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.0/README.Bugs>.


Regards

Thing



Reply to: