public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/25730] New: ICE in gfc_conv_component_ref
@ 2006-01-09 23:52 andrea dot bedini at gmail dot com
2006-01-09 23:53 ` [Bug fortran/25730] " andrea dot bedini at gmail dot com
` (8 more replies)
0 siblings, 9 replies; 10+ messages in thread
From: andrea dot bedini at gmail dot com @ 2006-01-09 23:52 UTC (permalink / raw)
To: gcc-bugs
$ /home/andrea/software/gcc-build/gcc/f951 -Wall -o testcase.o testcase.f90
str_clan
testcase.f90:19: internal compiler error: in gfc_conv_component_ref, at
fortran/trans-expr.c:282
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
--
Summary: ICE in gfc_conv_component_ref
Product: gcc
Version: 4.2.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: andrea dot bedini at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25730
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug fortran/25730] ICE in gfc_conv_component_ref
2006-01-09 23:52 [Bug fortran/25730] New: ICE in gfc_conv_component_ref andrea dot bedini at gmail dot com
@ 2006-01-09 23:53 ` andrea dot bedini at gmail dot com
2006-01-09 23:54 ` andrea dot bedini at gmail dot com
` (7 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: andrea dot bedini at gmail dot com @ 2006-01-09 23:53 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from andrea dot bedini at gmail dot com 2006-01-09 23:53 -------
Created an attachment (id=10603)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=10603&action=view)
reduced testcase
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25730
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug fortran/25730] ICE in gfc_conv_component_ref
2006-01-09 23:52 [Bug fortran/25730] New: ICE in gfc_conv_component_ref andrea dot bedini at gmail dot com
2006-01-09 23:53 ` [Bug fortran/25730] " andrea dot bedini at gmail dot com
@ 2006-01-09 23:54 ` andrea dot bedini at gmail dot com
2006-01-10 0:02 ` andrea dot bedini at gmail dot com
` (6 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: andrea dot bedini at gmail dot com @ 2006-01-09 23:54 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from andrea dot bedini at gmail dot com 2006-01-09 23:54 -------
Created an attachment (id=10604)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=10604&action=view)
backtrace
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25730
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug fortran/25730] ICE in gfc_conv_component_ref
2006-01-09 23:52 [Bug fortran/25730] New: ICE in gfc_conv_component_ref andrea dot bedini at gmail dot com
2006-01-09 23:53 ` [Bug fortran/25730] " andrea dot bedini at gmail dot com
2006-01-09 23:54 ` andrea dot bedini at gmail dot com
@ 2006-01-10 0:02 ` andrea dot bedini at gmail dot com
2006-01-10 0:04 ` pinskia at gcc dot gnu dot org
` (5 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: andrea dot bedini at gmail dot com @ 2006-01-10 0:02 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from andrea dot bedini at gmail dot com 2006-01-10 00:02 -------
In gfc_conv_component_ref line 280 I read
if (c->ts.type == BT_CHARACTER)
{
tmp = c->ts.cl->backend_decl;
/* Components must always be constant length. */
gcc_assert (tmp && INTEGER_CST_P (tmp));
se->string_length = tmp;
}
but at that time
(gdb) print *c
$1 = {name = 0x10b3e155 "coo", ts = {type = BT_CHARACTER, kind = 1, derived =
0x0, cl = 0x10b3fa88}, pointer = 0,
dimension = 0, as = 0x0, backend_decl = 0x301c1070, loc = {nextc = 0x0, lb =
0x0}, initializer = 0x0, next = 0x0}
(gdb) print *c.ts.cl
$2 = {length = 0x10b54f08, next = 0x0, backend_decl = 0x0, resolved = 1}
(gdb) print *c.ts.cl.length
$3 = {expr_type = EXPR_CONSTANT, ts = {type = BT_INTEGER, kind = 4, derived =
0x0, cl = 0x0}, rank = 0, shape = 0x0,
symtree = 0x0, ref = 0x0, where = {nextc = 0x10b3a6a0 "", lb = 0x10b3a680},
from_H = 0, inline_noncopying_intrinsic = 0,
value = {logical = 2, integer = {{_mp_alloc = 2, _mp_size = 1, _mp_d =
0x10b20ca0}}, real = {{_mpfr_prec = 2,
_mpfr_sign = 1, _mpfr_exp = 280104096, _mpfr_d = 0x0}}, complex = {r =
{{_mpfr_prec = 2, _mpfr_sign = 1,
_mpfr_exp = 280104096, _mpfr_d = 0x0}}, i = {{_mpfr_prec = 0,
_mpfr_sign = 0, _mpfr_exp = 0, _mpfr_d = 0x0}}},
op = {operator = INTRINSIC_PLUS, uop = 0x1, op1 = 0x10b20ca0, op2 = 0x0},
function = {actual = 0x2,
name = 0x1 <Address 0x1 out of bounds>, isym = 0x10b20ca0, esym = 0x0},
character = {length = 2,
string = 0x1 <Address 0x1 out of bounds>}, constructor = 0x2}}
so c->ts.cl->backend_decl is 0 and then the ICE, calling
gfc_conv_const_charlen(c->ts.cl) just before the length check seems to work
(but I really don't know what I'm talking about).
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25730
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug fortran/25730] ICE in gfc_conv_component_ref
2006-01-09 23:52 [Bug fortran/25730] New: ICE in gfc_conv_component_ref andrea dot bedini at gmail dot com
` (2 preceding siblings ...)
2006-01-10 0:02 ` andrea dot bedini at gmail dot com
@ 2006-01-10 0:04 ` pinskia at gcc dot gnu dot org
2006-01-10 1:03 ` [Bug fortran/25730] [4.1/4.2 Regression] " pinskia at gcc dot gnu dot org
` (4 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-01-10 0:04 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from pinskia at gcc dot gnu dot org 2006-01-10 00:04 -------
Reduced testcase:
MODULE testcase
TYPE orbit_elem
CHARACTER :: coo
END TYPE orbit_elem
END MODULE
MODULE tp_trace
USE testcase
TYPE(orbit_elem) :: tp_store
CONTAINS
SUBROUTINE str_clan()
USE testcase
TYPE(orbit_elem) :: mtpcar
mtpcar%coo='a'
END SUBROUTINE str_clan
END MODULE
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
OtherBugsDependingO| |19276
nThis| |
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Keywords| |ice-on-valid-code
Last reconfirmed|0000-00-00 00:00:00 |2006-01-10 00:04:16
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25730
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug fortran/25730] [4.1/4.2 Regression] ICE in gfc_conv_component_ref
2006-01-09 23:52 [Bug fortran/25730] New: ICE in gfc_conv_component_ref andrea dot bedini at gmail dot com
` (3 preceding siblings ...)
2006-01-10 0:04 ` pinskia at gcc dot gnu dot org
@ 2006-01-10 1:03 ` pinskia at gcc dot gnu dot org
2006-01-10 9:59 ` paul dot richard dot thomas at cea dot fr
` (3 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-01-10 1:03 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from pinskia at gcc dot gnu dot org 2006-01-10 01:03 -------
This is a regression as it worked on "4.2.0 20051219" though it did not work
with "4.2.0 20051231".
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P5
Summary|ICE in |[4.1/4.2 Regression] ICE in
|gfc_conv_component_ref |gfc_conv_component_ref
Target Milestone|--- |4.1.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25730
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug fortran/25730] [4.1/4.2 Regression] ICE in gfc_conv_component_ref
2006-01-09 23:52 [Bug fortran/25730] New: ICE in gfc_conv_component_ref andrea dot bedini at gmail dot com
` (4 preceding siblings ...)
2006-01-10 1:03 ` [Bug fortran/25730] [4.1/4.2 Regression] " pinskia at gcc dot gnu dot org
@ 2006-01-10 9:59 ` paul dot richard dot thomas at cea dot fr
2006-01-11 7:15 ` pault at gcc dot gnu dot org
` (2 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: paul dot richard dot thomas at cea dot fr @ 2006-01-10 9:59 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from paul dot richard dot thomas at cea dot fr 2006-01-10 09:59 -------
(In reply to comment #5)
> This is a regression as it worked on "4.2.0 20051219" though it did not work
> with "4.2.0 20051231".
Mea culpa - my patch fails to copy the character length backend declarations of
components when it has found a matching derived type declaration. A patch is
just now regtesting.
Paul
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25730
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug fortran/25730] [4.1/4.2 Regression] ICE in gfc_conv_component_ref
2006-01-09 23:52 [Bug fortran/25730] New: ICE in gfc_conv_component_ref andrea dot bedini at gmail dot com
` (5 preceding siblings ...)
2006-01-10 9:59 ` paul dot richard dot thomas at cea dot fr
@ 2006-01-11 7:15 ` pault at gcc dot gnu dot org
2006-01-11 7:27 ` pault at gcc dot gnu dot org
2006-01-11 7:42 ` pault at gcc dot gnu dot org
8 siblings, 0 replies; 10+ messages in thread
From: pault at gcc dot gnu dot org @ 2006-01-11 7:15 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from pault at gcc dot gnu dot org 2006-01-11 07:15 -------
Subject: Bug 25730
Author: pault
Date: Wed Jan 11 07:15:25 2006
New Revision: 109573
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=109573
Log:
2005-01-11 Paul Thomas <pault@gcc.gnu.org>
PR fortran/25730
* trans-types.c (copy_dt_decls_ifequal): Copy backend decl for
character lengths.
2006-01-11 Paul Thomas <pault@gcc.gnu.org>
PR fortran/25730
* gfortran.dg/used_types_1.f90: New test.
Added:
trunk/gcc/testsuite/gfortran.dg/used_types_1.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/trans-types.c
trunk/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25730
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug fortran/25730] [4.1/4.2 Regression] ICE in gfc_conv_component_ref
2006-01-09 23:52 [Bug fortran/25730] New: ICE in gfc_conv_component_ref andrea dot bedini at gmail dot com
` (6 preceding siblings ...)
2006-01-11 7:15 ` pault at gcc dot gnu dot org
@ 2006-01-11 7:27 ` pault at gcc dot gnu dot org
2006-01-11 7:42 ` pault at gcc dot gnu dot org
8 siblings, 0 replies; 10+ messages in thread
From: pault at gcc dot gnu dot org @ 2006-01-11 7:27 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from pault at gcc dot gnu dot org 2006-01-11 07:27 -------
Subject: Bug 25730
Author: pault
Date: Wed Jan 11 07:27:31 2006
New Revision: 109574
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=109574
Log:
2005-01-11 Paul Thomas <pault@gcc.gnu.org>
PR fortran/25730
* trans-types.c (copy_dt_decls_ifequal): Copy backend decl for
character lengths.
2006-01-11 Paul Thomas <pault@gcc.gnu.org>
PR fortran/25730
* gfortran.dg/used_types_1.f90: New test.
Added:
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/used_types_1.f90
Modified:
branches/gcc-4_1-branch/gcc/fortran/ChangeLog
branches/gcc-4_1-branch/gcc/fortran/trans-types.c
branches/gcc-4_1-branch/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25730
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug fortran/25730] [4.1/4.2 Regression] ICE in gfc_conv_component_ref
2006-01-09 23:52 [Bug fortran/25730] New: ICE in gfc_conv_component_ref andrea dot bedini at gmail dot com
` (7 preceding siblings ...)
2006-01-11 7:27 ` pault at gcc dot gnu dot org
@ 2006-01-11 7:42 ` pault at gcc dot gnu dot org
8 siblings, 0 replies; 10+ messages in thread
From: pault at gcc dot gnu dot org @ 2006-01-11 7:42 UTC (permalink / raw)
To: gcc-bugs
------- Comment #9 from pault at gcc dot gnu dot org 2006-01-11 07:42 -------
Fixed on trunk and 4.1.
Many thanks for reporting this. It's sometimes hard to remember all the cases
needed to test a patch and we depend on rapid feedback to get it right. In
this case, I just plain forgot that character components have this separate
backend declaration that has to be copied as well. None of my testcases had
character components, needless to say!
Paul
--
pault at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25730
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2006-01-11 7:42 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-01-09 23:52 [Bug fortran/25730] New: ICE in gfc_conv_component_ref andrea dot bedini at gmail dot com
2006-01-09 23:53 ` [Bug fortran/25730] " andrea dot bedini at gmail dot com
2006-01-09 23:54 ` andrea dot bedini at gmail dot com
2006-01-10 0:02 ` andrea dot bedini at gmail dot com
2006-01-10 0:04 ` pinskia at gcc dot gnu dot org
2006-01-10 1:03 ` [Bug fortran/25730] [4.1/4.2 Regression] " pinskia at gcc dot gnu dot org
2006-01-10 9:59 ` paul dot richard dot thomas at cea dot fr
2006-01-11 7:15 ` pault at gcc dot gnu dot org
2006-01-11 7:27 ` pault at gcc dot gnu dot org
2006-01-11 7:42 ` 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).