[Patc, fortran] PR85603 - ICE with character array substring assignment
Paul Richard Thomas
paul.richard.thomas@gmail.com
Sat Oct 20 12:32:00 GMT 2018
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 side symbols. I have added a test for the
regression to the testcase.
OK for trunk?
Paul
On Fri, 19 Oct 2018 at 23:15, Dominique d'Humières <dominiq@lps.ens.fr> wrote:
>
> 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 TPX(TP6,PP4,BA3)
> CLASS(TOP),INTENT(INOUT)::TP6
> INTEGER,INTENT(IN)::PP4
> TYPE(TOP),INTENT(OUT)::BA3
> BA3%ROR=TP6%ROR(PP4:)
> BA3%VI8=TP6%ROR(PP4:)
> TP6%ROR=TP6%ROR(:PP4-1)
> TP6%VI8=TP6%ROR(:PP4-1)
> END SUBROUTINE TPX
> END MODULE TN4
> ! https://groups.google.com/forum/#!topic/comp.lang.fortran/nV3TlRlVKBc
>
> TIA
>
> Dominique
>
> > Le 19 oct. 2018 à 23:39, Dominique d'Humières <dominiq@lps.ens.fr> a écrit :
> >
> > 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
> >
>
--
"If you can't explain it simply, you don't understand it well enough"
- Albert Einstein
More information about the Fortran
mailing list