This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Patch, fortran] PR29699 - ICE in trans-decl.c


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]