diff options
author | Tobias Burnus <burnus@net-b.de> | 2007-08-01 19:55:24 +0200 |
---|---|---|
committer | Tobias Burnus <burnus@gcc.gnu.org> | 2007-08-01 19:55:24 +0200 |
commit | b8a0d3cfd704fe84371ea9cb149ff58496383fc9 (patch) | |
tree | 160db656889ff31c1d6edfee7050056b9d5b9251 /gcc/fortran/check.c | |
parent | 8fe428c67045321f9f66b7051f60f549323b2694 (diff) | |
download | gcc-b8a0d3cfd704fe84371ea9cb149ff58496383fc9.zip gcc-b8a0d3cfd704fe84371ea9cb149ff58496383fc9.tar.gz gcc-b8a0d3cfd704fe84371ea9cb149ff58496383fc9.tar.bz2 |
re PR fortran/32936 (ALLOCATE: "STAT expression ... must be a variable" - but it is one)
2007-08-01 Tobias Burnus <burnus@net-b.de>
PR fortran/32936
* match.c (gfc_match_allocate): Better check that STAT is
a variable.
* check.c (gfc_check_allocated): Reorder checks to improve
error message.
2007-08-01 Tobias Burnus <burnus@net-b.de>
PR fortran/32936
* gfortran.dg/allocate_stat.f90: New.
From-SVN: r127135
Diffstat (limited to 'gcc/fortran/check.c')
-rw-r--r-- | gcc/fortran/check.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/fortran/check.c b/gcc/fortran/check.c index d111d0f..b615f73 100644 --- a/gcc/fortran/check.c +++ b/gcc/fortran/check.c @@ -488,9 +488,6 @@ gfc_check_allocated (gfc_expr *array) if (variable_check (array, 0) == FAILURE) return FAILURE; - if (array_check (array, 0) == FAILURE) - return FAILURE; - attr = gfc_variable_attr (array, NULL); if (!attr.allocatable) { @@ -500,6 +497,9 @@ gfc_check_allocated (gfc_expr *array) return FAILURE; } + if (array_check (array, 0) == FAILURE) + return FAILURE; + return SUCCESS; } |