public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/24813]  New: internal compiler error in gfortran
@ 2005-11-11 20:55 dbs at hpcrdm dot lbl dot gov
  2005-11-11 20:57 ` [Bug fortran/24813] " pinskia at gcc dot gnu dot org
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: dbs at hpcrdm dot lbl dot gov @ 2005-11-11 20:55 UTC (permalink / raw)
  To: gcc-bugs

../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


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2006-05-08  6:25 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-11-11 20:55 [Bug fortran/24813] New: internal compiler error in gfortran dbs at hpcrdm dot lbl dot gov
2005-11-11 20:57 ` [Bug fortran/24813] " pinskia at gcc dot gnu dot org
2005-11-11 21:10 ` pinskia at gcc dot gnu dot org
2006-01-01  6:26 ` [Bug fortran/24813] ICE on LEN on a parameter character array pinskia at gcc dot gnu dot org
2006-01-02  2:42 ` [Bug fortran/24813] ICE with constructer of character pinskia at gcc dot gnu dot org
2006-04-23  6:03 ` [Bug fortran/24813] ICE with scalarization LEN of character types pault at gcc dot gnu dot org
2006-04-24  9:10 ` paul dot thomas at jet dot uk
2006-04-28  8:00 ` patchapp at dberlin dot org
2006-05-07  5:46 ` pault at gcc dot gnu dot org
2006-05-08  5:02 ` pault at gcc dot gnu dot org
2006-05-08  6:25 ` pault at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).