This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: [Patch, fortran] PR29699 - ICE in trans-decl.c
- From: "Paul Richard Thomas" <paul dot richard dot thomas at gmail dot com>
- To: "Erik Edelmann" <erik dot edelmann at iki dot fi>
- Cc: fortran at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- Date: Wed, 8 Nov 2006 13:47:45 +0100
- Subject: Re: [Patch, fortran] PR29699 - ICE in trans-decl.c
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=eSozUt5Xhx12J7FinblTvphuY97hbXACams5NH9+z5mOftj7T9L2DI+cX7HO4MFOF00xAfgcVpYMvF2lxnW2a1UsJH33k9RmlHBbn0zvMFMACglP0wUWnhpMLE3W0rA8fGTMnvblqv98UGspwn6hryx+oosZM8YZS6Vb5WAEib4=
- References: <339c37f20611070229g1ca6417cx2f18850d33aae57e@mail.gmail.com> <20061108002542.GB31919@acclab.helsinki.fi>
Erik,
The patch itself is OK, but I have a comment on the testcase: in the
main program (before the CONTAINS line), there is no "interesting"
executable code -- only a type definition and a initialization of an
integer. There's more interesting executable code in the subroutines,
but no subroutine is called, so not much is tested at runtime. Perhaps
a
CALL extend_lists2
should be added to the main program?
You are quite right - I have submitted an earlier version of the test
programme, which was already attached to the PR, forgetting that I had
developed it much further.
This is what I had to hand here:
PROGRAM vocabulary_word_count
IMPLICIT NONE
TYPE VARYING_STRING
CHARACTER,DIMENSION(:),ALLOCATABLE :: chars
ENDTYPE VARYING_STRING
type(VARYING_STRING),DIMENSION(10) :: arg
INTEGER :: list_size=200
call extend_lists (arg)
CONTAINS
SUBROUTINE extend_lists (vocab_swap3)
type(VARYING_STRING),DIMENSION(list_size) :: vocab_swap
type(VARYING_STRING) :: vocab_swap1
type(VARYING_STRING),DIMENSION(10) :: vocab_swap2
type(VARYING_STRING),DIMENSION(:) :: vocab_swap3
allocate (vocab_swap(1)%chars(10))
allocate (vocab_swap1%chars(10))
allocate (vocab_swap2(1)%chars(10))
allocate (vocab_swap3(1)%chars(10))
ENDSUBROUTINE extend_lists
ENDPROGRAM vocabulary_word_count
but I have a better testcase at home that I will submit as soon as I
can get to it!
Many thanks for pointing this out.
Paul