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
* [Bug fortran/24813] internal compiler error in gfortran
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 ` pinskia at gcc dot gnu dot org
2005-11-11 21:10 ` pinskia at gcc dot gnu dot org
` (8 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-11-11 20:57 UTC (permalink / raw)
To: gcc-bugs
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Severity|critical |normal
GCC build triplet|same |i686-pc-linux-gnu
GCC host triplet|i686-pc-linux-gnu |
GCC target triplet|same |i686-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24813
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug fortran/24813] internal compiler error in gfortran
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
` (7 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-11-11 21:10 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from pinskia at gcc dot gnu dot org 2005-11-11 21:10 -------
Confirmed, reduced testcase:
MODULE fparser
INTEGER(is), PARAMETER :: cImmed = 1, &
VarBegin = 22
CHARACTER (LEN=5),DIMENSION(cAbs:cAtan), PARAMETER :: Funcs = (/ 'abs ',&
'exp ',&
'log10',&
'log ',&
'sqrt ',&
'sinh ',&
'cosh ',&
'tanh ',&
'sin ',&
'atan '&
/)
CONTAINS
CHARACTER (LEN=LEN(Funcs)) :: fun
END MODULE fparser
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2005-11-11 21:10:54
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24813
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug fortran/24813] ICE on LEN on a parameter character array
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 ` 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
` (6 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-01-01 6:26 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from pinskia at gcc dot gnu dot org 2006-01-01 06:26 -------
Even better reduced testcase:
CHARACTER (LEN=5),DIMENSION(2),PARAMETER :: Funcs = (/'abs ',&
'atan '/)
CHARACTER (LEN=LEN(Funcs)) :: fun
fun = ' '
End
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |ice-on-valid-code
Last reconfirmed|2005-11-11 21:10:54 |2006-01-01 06:26:47
date| |
Summary|internal compiler error in |ICE on LEN on a parameter
|gfortran |character array
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24813
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug fortran/24813] ICE with constructer of character
2005-11-11 20:55 [Bug fortran/24813] New: internal compiler error in gfortran dbs at hpcrdm dot lbl dot gov
` (2 preceding siblings ...)
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 ` 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
` (5 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-01-02 2:42 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from pinskia at gcc dot gnu dot org 2006-01-02 02:42 -------
Actually the reduced testcase is:
l = LEN((/'atan '/))
End
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|ICE on LEN on a parameter |ICE with constructer of
|character array |character
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24813
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug fortran/24813] ICE with scalarization LEN of character types
2005-11-11 20:55 [Bug fortran/24813] New: internal compiler error in gfortran dbs at hpcrdm dot lbl dot gov
` (3 preceding siblings ...)
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 ` pault at gcc dot gnu dot org
2006-04-24 9:10 ` paul dot thomas at jet dot uk
` (4 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: pault at gcc dot gnu dot org @ 2006-04-23 6:03 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from pault at gcc dot gnu dot org 2006-04-23 06:03 -------
This looks to be fixable at trans-intrinsic.c(gfc_conv_intrinsic_len), here a
special switch branch for constructors is needed.
I will make it so.
Paul
--
pault at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |pault at gcc dot gnu dot org
|dot org |
Status|NEW |ASSIGNED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24813
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug fortran/24813] ICE with scalarization LEN of character types
2005-11-11 20:55 [Bug fortran/24813] New: internal compiler error in gfortran dbs at hpcrdm dot lbl dot gov
` (4 preceding siblings ...)
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
` (3 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: paul dot thomas at jet dot uk @ 2006-04-24 9:10 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from paul dot thomas at jet dot uk 2006-04-24 09:10 -------
(In reply to comment #4)
> This looks to be fixable at trans-intrinsic.c(gfc_conv_intrinsic_len), here a
> special switch branch for constructors is needed.
> I will make it so.
> Paul
This is indeed the case; the ICE comes about because none of the trappings of
the scalarizer have been invoked to translate the array constructor. Rather
than do this, I have called trans-array.c (get_array_ctor_strlen) to obtain the
string length directly. This clears the bug; I will regtest tonight and will
submit tomorrow.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24813
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug fortran/24813] ICE with scalarization LEN of character types
2005-11-11 20:55 [Bug fortran/24813] New: internal compiler error in gfortran dbs at hpcrdm dot lbl dot gov
` (5 preceding siblings ...)
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
` (2 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: patchapp at dberlin dot org @ 2006-04-28 8:00 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from patchapp at dberlin dot org 2006-04-28 08:00 -------
Subject: Bug number PR24813
A patch for this bug has been added to the patch tracker.
The mailing list url for the patch is
http://gcc.gnu.org/ml/gcc-patches/2006-04/msg01075.html
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24813
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug fortran/24813] ICE with scalarization LEN of character types
2005-11-11 20:55 [Bug fortran/24813] New: internal compiler error in gfortran dbs at hpcrdm dot lbl dot gov
` (6 preceding siblings ...)
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
9 siblings, 0 replies; 11+ messages in thread
From: pault at gcc dot gnu dot org @ 2006-05-07 5:46 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from pault at gcc dot gnu dot org 2006-05-07 05:46 -------
Subject: Bug 24813
Author: pault
Date: Sun May 7 05:46:26 2006
New Revision: 113594
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=113594
Log:
2006-05-07 Paul Thomas <pault@gcc.gnu.org>
PR fortran/24813
* trans-array.c (get_array_ctor_strlen): Remove static attribute.
* trans.h: Add prototype for get_array_ctor_strlen.
* trans-intrinsic.c (gfc_conv_intrinsic_len): Switch on EXPR_ARRAY
and call get_array_ctor_strlen.
2006-05-07 Paul Thomas <pault@gcc.gnu.org>
PR fortran/24813
* gfortran.dg/char_cons_len_1.f90: New test.
Added:
trunk/gcc/testsuite/gfortran.dg/char_cons_len.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/trans-array.c
trunk/gcc/fortran/trans-intrinsic.c
trunk/gcc/fortran/trans.h
trunk/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24813
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug fortran/24813] ICE with scalarization LEN of character types
2005-11-11 20:55 [Bug fortran/24813] New: internal compiler error in gfortran dbs at hpcrdm dot lbl dot gov
` (7 preceding siblings ...)
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
9 siblings, 0 replies; 11+ messages in thread
From: pault at gcc dot gnu dot org @ 2006-05-08 5:02 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from pault at gcc dot gnu dot org 2006-05-08 05:02 -------
Subject: Bug 24813
Author: pault
Date: Mon May 8 05:01:56 2006
New Revision: 113618
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=113618
Log:
2006-05-08 Paul Thomas <pault@gcc.gnu.org>
PR fortran/24813
* trans-array.c (get_array_ctor_strlen): Remove static attribute.
* trans.h: Add prototype for get_array_ctor_strlen.
* trans-intrinsic.c (gfc_conv_intrinsic_len): Switch on EXPR_ARRAY
and call get_array_ctor_strlen.
PR fortran/27269
* module.c: Add static flag in_load_equiv.
(mio_expr_ref): Return if no symtree and in_load_equiv.
(load_equiv): If any of the equivalence members have no symtree, free
the equivalence and the associated expressions.
PR fortran/27324
* trans-common.c (gfc_trans_common): Invert the order of calls to
finish equivalences and gfc_commit_symbols.
PR fortran/25099
* resolve.c (resolve_call): Check conformity of elemental
subroutine actual arguments.
2006-05-08 Paul Thomas <pault@gcc.gnu.org>
PR fortran/24813
* gfortran.dg/char_cons_len.f90: New test.
PR fortran/27269
PR fortran/27324
* gfortran.dg/module_equivalence_2.f90: New test.
PR fortran/25099
* gfortran.dg/elemental_subroutine_4.f90: New test.
* gfortran.dg/assumed_size_refs_1.f90: Add error to non-conforming
call sub (m, x).
Added:
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/char_cons_len.f90
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/elemental_subroutine_4.f90
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/module_equivalence_2.f90
Modified:
branches/gcc-4_1-branch/gcc/fortran/ChangeLog
branches/gcc-4_1-branch/gcc/fortran/module.c
branches/gcc-4_1-branch/gcc/fortran/resolve.c
branches/gcc-4_1-branch/gcc/fortran/trans-array.c
branches/gcc-4_1-branch/gcc/fortran/trans-common.c
branches/gcc-4_1-branch/gcc/fortran/trans-intrinsic.c
branches/gcc-4_1-branch/gcc/fortran/trans.h
branches/gcc-4_1-branch/gcc/testsuite/ChangeLog
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/assumed_size_refs_1.f90
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24813
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug fortran/24813] ICE with scalarization LEN of character types
2005-11-11 20:55 [Bug fortran/24813] New: internal compiler error in gfortran dbs at hpcrdm dot lbl dot gov
` (8 preceding siblings ...)
2006-05-08 5:02 ` pault at gcc dot gnu dot org
@ 2006-05-08 6:25 ` pault at gcc dot gnu dot org
9 siblings, 0 replies; 11+ messages in thread
From: pault at gcc dot gnu dot org @ 2006-05-08 6:25 UTC (permalink / raw)
To: gcc-bugs
------- Comment #9 from pault at gcc dot gnu dot org 2006-05-08 06:25 -------
Fixed on trunk and 4.1
Paul
--
pault at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
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).