Hi Paul,
2018-10-18 Paul Thomas
PR fortran/85603
* frontend-passes.c (get_len_call): New function to generate a
call to intrinsic LEN.
(create_var): Use this to make length expressions for variable
rhs string lengths.
Clean up some white space issues.
2018-10-
Hmmm! It helps to provide the patch.
2018-10-18 Paul Thomas
PR fortran/85603
* frontend-passes.c (get_len_call): New function to generate a
call to intrinsic LEN.
(create_var): Use this to make length expressions for variable
rhs string lengths.
Clean up some white spac
Hi Dominique,
Thanks for picking that up. For some reason that I do now see, the
regression is caused by the component references. The frontend
temporary is picking up the deferred tag from somewhere, even though
it is not set. Anyway, all is well if the patch is restricted to
character right hand
Reduced test
! { dg-do compile }
MODULE TN4
IMPLICIT NONE
PRIVATE
INTEGER,PARAMETER::SH4=KIND('a')
TYPE,PUBLIC::TOP
CHARACTER(:,KIND=SH4),ALLOCATABLE::ROR
CHARACTER(:,KIND=SH4),ALLOCATABLE::VI8
CONTAINS
PROCEDURE,NON_OVERRIDABLE::SB=>TPX
END TYPE TOP
CONTAINS
SUBROUTINE T
Hi Paul,
I get a regression with your patch:
obfuscated_tn4.f90:300:0:
300 | TP6%ROR=TP6%ROR(:PP4-1)
|
internal compiler error: in gfc_trans_deferred_vars, at
fortran/trans-decl.c:4754
I’ll try to reduce the test.
Dominique
It turned out that this patch did not quite complete the job (Thanks
Walt): The ICE has gone but reallocation on assignment is not
occurring because the correct string length for the rhs expression was
not being picked up. The fix for this took rather more detective work
than I anticipated but here
Yet another 'obvious' deferred character fix. Committed to trunk as
r264502. Will backport in about ten days time.
Paul
2018-09-22 Paul Thomas
PR fortran/85603
* trans-array.c (gfc_alloc_allocatable_for_assignment): Test
the charlen backend_decl before using the VAR_P macro.
2018