diff options
author | Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de> | 2005-11-10 22:49:29 +0100 |
---|---|---|
committer | Tobias Schlüter <tobi@gcc.gnu.org> | 2005-11-10 22:49:29 +0100 |
commit | c040ffff7577b6798465f6c025de2b1f77cec1e9 (patch) | |
tree | 175d54b20da14c63f04d177c7e4554d912932378 /gcc/fortran/primary.c | |
parent | 5f4b73288dd35d516ff8a3b2b5ba19715beaaace (diff) | |
download | gcc-c040ffff7577b6798465f6c025de2b1f77cec1e9.zip gcc-c040ffff7577b6798465f6c025de2b1f77cec1e9.tar.gz gcc-c040ffff7577b6798465f6c025de2b1f77cec1e9.tar.bz2 |
re PR fortran/24643 (Unclassifiable statement on implicitly typed character substring)
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
Diffstat (limited to 'gcc/fortran/primary.c')
-rw-r--r-- | gcc/fortran/primary.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/fortran/primary.c b/gcc/fortran/primary.c index e3e8127..1cb5d23 100644 --- a/gcc/fortran/primary.c +++ b/gcc/fortran/primary.c @@ -1634,6 +1634,15 @@ match_varspec (gfc_expr * primary, int equiv_flag) } 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)) |