public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "dbs at hpcrdm dot lbl dot gov" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/24813]  New: internal compiler error in gfortran
Date: Fri, 11 Nov 2005 20:55:00 -0000	[thread overview]
Message-ID: <bug-24813-11701@http.gcc.gnu.org/bugzilla/> (raw)

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


             reply	other threads:[~2005-11-11 20:55 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-11 20:55 dbs at hpcrdm dot lbl dot gov [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-24813-11701@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).