Hi! Well... I've spoted a problem for a couple of weeks now, but I don't seem to be able to make a "nice" case from it... I'm sorry I do not know anything about compiler developpement, and I try to keep a safe distance from C... So, here are the original sources (minus a lot of thinks which were not necessary)...
I hope it makes sense to someone... Philippe PS: I can also send the files as a tarball, I just don't know how to... -------------------------------------------------------------------------------- PPS: my version: GNU Fortran 95 (GCC 4.1.0 20050517 (experimental)) Copyright (C) 2005 Free Software Foundation, Inc. GNU Fortran comes with NO WARRANTY, to the extent permitted by law. You may redistribute copies of GNU Fortran under the terms of the GNU General Public License. For more information about these matters, see the file named COPYING -------------------------------------------------------------------------------- PPPS: the error message I get: MODULE_IO.f90:0: internal compiler error: in lhd_set_decl_assembler_name, at langhooks.c:165 Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://gcc.gnu.org/bugs.html> for instructions. MODULE_SPRACHE.f90: In function ???ctn_error_interception???: MODULE_SPRACHE.f90:120: internal compiler error: in gfc_conv_variable, at fortran/trans-expr.c:350 Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://gcc.gnu.org/bugs.html> for instructions. -------------------------------------------------------------------------------- PPPPS: how to get it: rm -f *.o *.mod ./gfortran -g -pedantic-errors -Wall -c MODULE_IO.f90 ./gfortran -g -pedantic-errors -Wall -c MODULE_SPRACHE.f90 -------------------------------------------------------------------------------- PPPPPS: first file: "MODULE_IO.f90": !======================================================================! ! ********************************************************************** ! * * ! * M O D U L E _ I O * ! * * ! ********************************************************************** !======================================================================! ! ! Object: ! ====== ! Generic subroutines for input/output. ! ! !======================================================================! ! USER-defines and Parameters !======================================================================! ! ! MODULE MODULE_IO ! ! ! Modules ! ======= ! USE MODULE_DIMENSION, ONLY: Length_File_Name INTEGER, PARAMETER :: Length_File_Name = 250 ! ! ! ! Integer ! ======= INTEGER, PARAMETER :: Screen = 01 ! ! ! Character ! ========= CHARACTER ( LEN = Input_String_Length ):: bufferString ! ! ! Interface for outAusgabe ! ======================== ! INTERFACE SUBROUTINE outAusgabe ( Output, String, Boolean, Intg, & & Single, Double, Fmt ) ! USE MODULE_DIMENSION, ONLY: Sng, Dbl LOGICAL, OPTIONAL, INTENT ( IN ) :: Boolean INTEGER, INTENT ( IN ) :: Output INTEGER, OPTIONAL, INTENT ( IN ) :: Intg REAL ( KIND = 4 ), OPTIONAL, INTENT ( IN ) :: Single REAL ( KIND = 8 ), OPTIONAL, INTENT ( IN ) :: Double CHARACTER ( LEN = * ), OPTIONAL, INTENT(IN) :: String CHARACTER ( LEN = * ), OPTIONAL, INTENT(IN) :: Fmt END SUBROUTINE outAusgabe END INTERFACE ! ! ! Generic interface for Ausgabe ! ============================= ! INTERFACE Ausgabe ! MODULE PROCEDURE outString ! END INTERFACE Ausgabe ! ! ! Subroutines for generic interface for Eingabe ! ============================================= ! CONTAINS ! ! ! Subroutines for generic interface for Ausgabe ! ============================================= ! SUBROUTINE outString ( Unit, String, Fmt ) ! USE MODULE_DIMENSION, ONLY: Sng, Dbl IMPLICIT NONE INTEGER, INTENT ( IN ) :: Unit CHARACTER ( LEN = * ), INTENT ( IN ) :: String CHARACTER ( LEN = * ), OPTIONAL, INTENT ( IN ):: Fmt IF ( PRESENT ( Fmt ) ) THEN CALL outAusgabe ( Output = Unit, String = String, & & Fmt = Fmt ) ELSE CALL outAusgabe ( Output = Unit, String = String ) ENDIF END SUBROUTINE outString ! ! !======================================================================! ! End: Module MODULE_IO !======================================================================! ! END MODULE MODULE_IO ! -------------------------------------------------------------------------------- PPPPPS: first file: "MODULE_SPRACHE.f90": !======================================================================! ! ********************************************************************** ! * * ! * M O D U L E _ S P R A C H E * ! * * ! ********************************************************************** !======================================================================! ! Zweck: ! ====== ! Fortran90 Module for language settings ! ! Verwaltung: ! =========== ! Angelegt am 05.12.00 Philippe Schaffnit ! Last changes ! 09.02.01 PS Changes related to V2.2 ! 20.01.05 PS 'Message' functions here ! !======================================================================! ! Variables-documentation !======================================================================! ! ! Unit is the number of the unit affected to the messages file ! Path_* is the path to this file (without extension) starting from ! the directory specified by the user at the beginning of simulation. ! !======================================================================! ! Declarations !======================================================================! ! ! MODULE MODULE_SPRACHE ! ! ! Modules ! ======= ! USE MODULE_DIMENSION, ONLY: Length_File_Name, Length_Message USE MODULE_IO INTEGER, PARAMETER :: Length_Message = 250 ! ! ! Character ! ========= ! CHARACTER ( LEN = * ), PARAMETER :: New_message = & & "----------" ! ! !======================================================================! ! "Message functions" !======================================================================! ! CONTAINS ! ! !======================================================================! ! "Read_Message" !======================================================================! ! FUNCTION Read_Message ( Name, Unit, Message, Line ) ! USE MODULE_IO IMPLICIT NONE LOGICAL :: Unit_Connected INTEGER, INTENT ( IN ) :: Unit, Message, Line INTEGER :: IO_Stat, Number, k CHARACTER ( LEN =Length_Message):: Read_Message CHARACTER ( LEN = * ),INTENT(IN):: Name CHARACTER ( LEN =Length_Message):: Text ! ! Check if file is connected ! -------------------------- INQUIRE ( UNIT = Unit, OPENED = Unit_Connected ) IF ( .NOT. Unit_Connected ) & & CALL CTN_Error_Interception ! ! Rewind file ! ----------- REWIND ( Unit ) ! ! Find message ! ------------ DO READ ( Unit, "(A)", IOSTAT = IO_Stat ) Text IF ( IO_Stat .NE. 0 ) & & CALL CTN_Error_Interception IF ( Text(1:10) .EQ. New_message ) THEN READ ( UNIT = Unit, FMT = *, IOSTAT = IO_Stat ) & & Number IF ( IO_Stat .NE. 0 ) & & CALL CTN_Error_Interception IF ( Number .EQ. Message ) & & EXIT ENDIF ENDDO ! ! Read line ! --------- DO k = 1, Line READ ( Unit, "(A)", IOSTAT = IO_Stat ) Text IF ( IO_Stat .NE. 0 ) & & CALL CTN_Error_Interception IF ( Text(1:10) .EQ. New_message ) & & CALL CTN_Error_Interception ENDDO ! ! Output ! ------ Read_Message = Text ! ! Error interception ! ------------------ CONTAINS SUBROUTINE CTN_Error_Interception ! Text = " ERROR IN ROUTINE " // TRIM(Name) // "!" CALL Ausgabe ( Screen, TRIM(Text) // "!", "(/A)" ) WRITE ( Text, "(A,I5,A,I3)" ) " MESSAGE NOT FOUND:", & & Message, " -", Line CALL Ausgabe ( Screen, TRIM(Text), "(A/)" ) Read_Message = Text RETURN ! END SUBROUTINE CTN_Error_Interception ! END FUNCTION Read_Message ! ! !======================================================================! ! End: Module MODULE_SPRACHE !======================================================================! ! END MODULE MODULE_SPRACHE ! -- Summary: internal compiler error: in lhd_set_decl_assembler_name, at langhooks.c:165 Product: gcc Version: 4.1.0 Status: UNCONFIRMED Severity: normal Priority: P2 Component: fortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: P dot Schaffnit at access dot rwth-aachen dot de CC: gcc-bugs at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21877