[gfortran] Fix PR 24643

Tobias Schlüter tobias.schlueter@physik.uni-muenchen.de
Wed Nov 9 00:08:00 GMT 2005


Steven Bosscher wrote:
>>===================================================================
>>--- testsuite/gfortran.dg/implicit_6.f90        (revision 0)
>>+++ testsuite/gfortran.dg/implicit_6.f90        (revision 0)
>>@@ -0,0 +1,8 @@
>>+! { dg-do compile }
>>+! PR 24643
>>+! substring references on implicitly typed CHARACTER variables didn't work
>>+        PROGRAM P
>>+        IMPLICIT CHARACTER*8 (Y)
>>+        YLOCAL='A'
>>+        YBTABLE=YLOCAL(1:2)
>>+        END
> 
> I would like to know why we don't set the type on YLOCAL when we
> parse the first assignment, i.e. "YLOCAL='A'".  I would expect
> that we figure out there that we have a symbol on the lhs that
> can't be anything else but a variable, but without a type.  So we
> should give it its implicit type there, shouldn't we?

I don't know.  Logically, we could probably give it a type there.  But I'm not
sure if there are uses of gfc_match_variable where a type declaration may follow.

- Tobi



More information about the Fortran mailing list