From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2147 invoked by alias); 11 Nov 2005 20:55:23 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 2130 invoked by uid 48); 11 Nov 2005 20:55:21 -0000 Date: Fri, 11 Nov 2005 20:55:00 -0000 Subject: [Bug fortran/24813] New: internal compiler error in gfortran X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "dbs at hpcrdm dot lbl dot gov" X-SW-Source: 2005-11/txt/msg01704.txt.bz2 List-Id: ../Src/fparser.f90:329: internal compiler error: in gfc_conv_array_constructor_expr, at fortran/trans-expr.c:1975 The problem is at the line "CHARACTER (LEN=LEN(Funcs)) :: fun" It goes away if changed to: LEN=LEN(Funcs(cAbs)) but I believe the standard says the argument to LEN() can be array valued (I don't have my copy handy, but my DEC Reference Manual, which is rarely wrong, says this.) Here's the code: MODULE fparser IMPLICIT NONE INTEGER, PARAMETER :: is = SELECTED_INT_KIND(4) ! Data type of bytecode PRIVATE SAVE INTEGER(is), PARAMETER :: cImmed = 1, & cAbs = 8, & cExp = 9, & cLog10 = 10, & cLog = 11, & cSqrt = 12, & cSinh = 13, & cCosh = 14, & cTanh = 15, & cSin = 16, & cCos = 17, & cTan = 18, & cAsin = 19, & cAcos = 20, & cAtan = 21, & VarBegin = 22 CHARACTER (LEN=5), DIMENSION(cAbs:cAtan), PARAMETER :: Funcs = (/ 'abs ', & 'exp ', & 'log10', & 'log ', & 'sqrt ', & 'sinh ', & 'cosh ', & 'tanh ', & 'sin ', & 'cos ', & 'tan ', & 'asin ', & 'acos ', & 'atan ' /) CONTAINS FUNCTION MathFunctionIndex (str) RESULT (n) IMPLICIT NONE CHARACTER (LEN=*), INTENT(in) :: str INTEGER(is) :: n,j INTEGER :: k CHARACTER (LEN=LEN(Funcs)) :: fun n = 0 DO j=cAbs,cAtan ! Check all math functions k = MIN(LEN_TRIM(Funcs(j)), LEN(str)) CALL LowCase (str(1:k), fun) IF (fun == Funcs(j)) THEN ! Compare lower case letters n = j ! Found a matching function EXIT END IF END DO END FUNCTION MathFunctionIndex END MODULE fparser -- Summary: internal compiler error in gfortran Product: gcc Version: 4.1.0 Status: UNCONFIRMED Severity: critical Priority: P3 Component: fortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: dbs at hpcrdm dot lbl dot gov GCC build triplet: same GCC host triplet: i686-pc-linux-gnu GCC target triplet: same http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24813