aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/match.c
diff options
context:
space:
mode:
authorTobias Burnus <burnus@net-b.de>2012-05-23 22:35:30 +0200
committerTobias Burnus <burnus@gcc.gnu.org>2012-05-23 22:35:30 +0200
commit239b48db1b238cf5395570604ca4400e74025ab4 (patch)
treea7d3d8d07d0cdf98767cf2fe01f82ab79c4d7140 /gcc/fortran/match.c
parent2e74510357a26f3ec3f80d5c770437ca3666d92a (diff)
downloadgcc-239b48db1b238cf5395570604ca4400e74025ab4.zip
gcc-239b48db1b238cf5395570604ca4400e74025ab4.tar.gz
gcc-239b48db1b238cf5395570604ca4400e74025ab4.tar.bz2
re PR fortran/51055 (deferred length character allocation: allocate(character(len=i)::s) rejected)
2012-05-23 Tobias Burnus <burnus@net-b.de> PR fortran/51055 PR fortran/45170 * match.c (gfc_match_allocate): Set length_from_typespec for characters. * resolve.c (resolve_charlen): If set, don't check whether the len is a specification expression. 2012-05-23 Tobias Burnus <burnus@net-b.de> PR fortran/51055 PR fortran/45170 * gfortran.dg/allocate_with_typespec_6.f90: New. From-SVN: r187811
Diffstat (limited to 'gcc/fortran/match.c')
-rw-r--r--gcc/fortran/match.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/fortran/match.c b/gcc/fortran/match.c
index 3d11918..93d7fab 100644
--- a/gcc/fortran/match.c
+++ b/gcc/fortran/match.c
@@ -3466,6 +3466,9 @@ gfc_match_allocate (void)
"type parameter", &old_locus);
goto cleanup;
}
+
+ if (ts.type == BT_CHARACTER)
+ ts.u.cl->length_from_typespec = true;
}
else
{