diff options
author | Tobias Burnus <burnus@net-b.de> | 2012-01-27 14:06:13 +0100 |
---|---|---|
committer | Tobias Burnus <burnus@gcc.gnu.org> | 2012-01-27 14:06:13 +0100 |
commit | 4cb2a86715695603f8abf1396436b68a7281221b (patch) | |
tree | 2f41d3a752c94648faa27cf9232ade0c629edc7f /gcc/fortran | |
parent | 9775a921e0fb21cdd92ba3c26e603661865a5899 (diff) | |
download | gcc-4cb2a86715695603f8abf1396436b68a7281221b.zip gcc-4cb2a86715695603f8abf1396436b68a7281221b.tar.gz gcc-4cb2a86715695603f8abf1396436b68a7281221b.tar.bz2 |
re PR fortran/51953 ([F2008] Allow multiple allocate-objects in ALLOCATE with SOURCE=)
2012-01-27 Tobias Burnus <burnus@net-b.de>
PR fortran/51953
* match.c (gfc_match_allocate): Allow more than allocate
object with SOURCE=.
2012-01-27 Tobias Burnus <burnus@net-b.de>
PR fortran/51953
* gfortran.dg/allocate_alloc_opt_13.f90: New.
* gfortran.dg/allocate_alloc_opt_4.f90: Add -std=f2003
and change dg-error string.
From-SVN: r183621
Diffstat (limited to 'gcc/fortran')
-rw-r--r-- | gcc/fortran/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/fortran/match.c | 11 |
2 files changed, 11 insertions, 6 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 675c6ee..1c709f0 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,5 +1,11 @@ 2012-01-27 Tobias Burnus <burnus@net-b.de> + PR fortran/51953 + * match.c (gfc_match_allocate): Allow more than allocate + object with SOURCE=. + +2012-01-27 Tobias Burnus <burnus@net-b.de> + PR fortran/52016 * resolve.c (resolve_formal_arglist): Fix elemental constraint checks for polymorphic dummies. diff --git a/gcc/fortran/match.c b/gcc/fortran/match.c index fd91921..0585308 100644 --- a/gcc/fortran/match.c +++ b/gcc/fortran/match.c @@ -3660,12 +3660,11 @@ alloc_opt_list: goto cleanup; } - if (head->next) - { - gfc_error ("SOURCE tag at %L requires only a single entity in " - "the allocation-list", &tmp->where); - goto cleanup; - } + if (head->next + && gfc_notify_std (GFC_STD_F2008, "Fortran 2008: SOURCE tag at %L" + " with more than a single allocate objects", + &tmp->where) == FAILURE) + goto cleanup; source = tmp; tmp = NULL; |