This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

g77 bug report



This is with egcs - g77:

#uname -a
Linux bacchus.pc1.uni-duesseldorf.de 2.0.33 #1 Wed Feb 25 11:42:35 CET 
1998 alpha unknown

# eg77 -v
Reading specs from 
/usr/local/share/egcs/lib/gcc-lib/alphaev5-dec-linux-gnu/egcs-2.91.12/specs
gcc version egcs-2.91.12 980302 (gcc-2.8.0 release)

The following program gives a segmentation fault at the second
array access, while the first one does work:
 
      program rotor
      implicit none
      integer   KaKc(0:5,-5:5,0:2)
      integer   cj
      call setkac( KaKc, 5 )
      stop
      end
c     ---------------------------------------------
      subroutine setkac( KaKc, Jmax )
      implicit none
      integer   Jmax
      integer   KaKc( 0:Jmax, -Jmax:Jmax, 0:2 )
      integer   cj, i
      cj = 0
      i = -cj
      KaKc( cj, i, 1 ) = 0
      write(*,*) 'Here we go !'
      KaKc( cj, -cj, 1 ) = 0
      return
      end

It does work on DU 4.0b using the system f77 compiler.
Is this a known problem ? Any workaround ?
I do have all code that is using such constructs all over ?
(And I don't know the code.)

Cheers,
Jochen


-----------------------------------------------------------------------
  Jochen K"upper

  Heinrich-Heine-Universit"at D"usseldorf   jochen@uni-duesseldorf.de
  Institut f"ur Physikalische Chemie I
  Universit"atsstr. 1, Geb 26.43 Raum 02.29    phone ++49-211-8113681
  40225 D"usseldorf                            fax   ++49-211-8115195
  Germany             http://www-public.rz.uni-duesseldorf.de/~jochen
-----------------------------------------------------------------------




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]