fortran/
PR fortran/24643
* primary.c (match_varspec): Check for implicitly typed CHARACTER
variables before matching substrings.
testsuite/
PR fortran/24643
* gfortran.dg/implicit_6.f90, gfortran.dg/implicit_7.f90: New.
From-SVN: r106753
+2005-11-10 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
+
+ PR fortran/24643
+ * primary.c (match_varspec): Check for implicitly typed CHARACTER
+ variables before matching substrings.
+
2005-11-09 Steven G. Kargl <kargls@comcast.net>
* trans-intrinsic.c: Typo in comment.
}
check_substring:
+ if (primary->ts.type == BT_UNKNOWN)
+ {
+ if (gfc_get_default_type (sym, sym->ns)->type == BT_CHARACTER)
+ {
+ gfc_set_default_type (sym, 0, sym->ns);
+ primary->ts = sym->ts;
+ }
+ }
+
if (primary->ts.type == BT_CHARACTER)
{
switch (match_substring (primary->ts.cl, equiv_flag, &substring))
+2005-11-10 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
+
+ PR fortran/24643
+ * gfortran.dg/implicit_6.f90, gfortran.dg/implicit_7.f90: New.
+
2005-11-10 Alexandre Oliva <aoliva@redhat.com>
* gcc.dg/attr-weakref-1.c: Add exit (0) to avoid spurious
--- /dev/null
+! { 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
--- /dev/null
+! { dg-do compile }
+! PR 24643
+! This tests a case where the compiler used to ICE in an early
+! incarnation of the patch
+ylocal=1
+ybtable=ylocal(1:2) ! { dg-error "Unclassifiable" }
+end