compiler problem, gfortran, interface, darwin architecture, OS Panther 10.4

Simen Reine simen.reine@kjemi.uio.no
Thu Jan 26 09:13:00 GMT 2006


I have a compiliation problem, which as far as I can see (I'm no expert) 
is related to interface. I get an "internal compiler error:bus error, 
please submit a full bug report". I've been browsing bugzilla, and found a 
similar bug reported there (17615) dated september 2004. Here it seems 
the problem is fixed.

Is this still a problem for the darwin architectur, or am I simply doing 
something wrong?

I've downloaded gfortran from (Binaries: PANTHER g95-bin.tar.gz updated 
December 2005):
http://hpc.sourceforge.net/

The code that gives an error:
***************************************************************************************
---my_module.f90:
MODULE routines
IMPLICIT NONE
PRIVATE
PUBLIC :: my_allocate
INTERFACE my_allocate
   MODULE PROCEDURE allocate_1
   MODULE PROCEDURE allocate_2
END INTERFACE
INTEGER, PARAMETER        :: INTK = 8
INTEGER, PARAMETER        :: REALK = 8
CONTAINS
    SUBROUTINE allocate_1(name,array,a)

       IMPLICIT NONE
       REAL(REALK),   POINTER    :: array(:)
       INTEGER(INTK), INTENT(IN) :: a, name

       ALLOCATE(array(a))
    END SUBROUTINE allocate_1
    SUBROUTINE allocate_2(name,array,a,b)

       IMPLICIT NONE
       REAL(REALK),   POINTER    :: array(:,:)
       INTEGER(INTK), INTENT(IN) :: a,b, name

       ALLOCATE(array(a,b))
    END SUBROUTINE allocate_2

END MODULE

--bug.f90
MODULE fun
IMPLICIT NONE
PRIVATE
PUBLIC :: bug
CONTAINS
SUBROUTINE bug
USE routines
IMPLICIT NONE
   INTEGER, PARAMETER        :: INTK = 8
   INTEGER, PARAMETER        :: REALK = 8
   REAL(REALK),   POINTER    :: array(:), matrix(:,:)
   INTEGER(INTK)             :: a,b
   a    = 10
   b    = 50
   call my_allocate(1,array,a)
! call my_allocate(2,matrix,a,b)
END SUBROUTINE
END MODULE fun
****************************************************************************

I compile with:

>gfortran -c my_module.f90
>gfortran -c bug.f90

and get the following error message:

bug.f90:0: internal compiler error: Bus error
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.

______________________________________________________________

Simen S. Reine              E-mail    : simensr@kjemi.uio.no
Department of Chemistry     Telephone : (+47) 22 85 54 27
University of Oslo          Fax       : (+47) 22 85 54 41
P.O.Box 1033 Blindern       Mobile ph.: (+47) 93 40 58 71
N-0315 Oslo, Norway
______________________________________________________________



More information about the Gcc-help mailing list