diff options
| author | fxcoudert <fxcoudert@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-04-19 07:10:05 +0000 |
|---|---|---|
| committer | fxcoudert <fxcoudert@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-04-19 07:10:05 +0000 |
| commit | 06367b6e15ff32cc95b4b1c9ca58b7080a4cbd3d (patch) | |
| tree | 8df8134ac278ca36ff0980df848ac7970a0e17d4 /gcc/fortran/resolve.c | |
| parent | 5f1ac770e0c36a7b188d6ad44b0043967c859c6d (diff) | |
| download | ppe42-gcc-06367b6e15ff32cc95b4b1c9ca58b7080a4cbd3d.tar.gz ppe42-gcc-06367b6e15ff32cc95b4b1c9ca58b7080a4cbd3d.zip | |
PR fortran/16861
* resolve.c (resolve_variable): If e->symtree is not set, this
ought to be a FAILURE, and not a segfault.
* gfortran.dg/pr16861.f90: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@98391 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fortran/resolve.c')
| -rw-r--r-- | gcc/fortran/resolve.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c index 16db94342d1..d75704bc8e2 100644 --- a/gcc/fortran/resolve.c +++ b/gcc/fortran/resolve.c @@ -2111,6 +2111,9 @@ resolve_variable (gfc_expr * e) if (e->ref && resolve_ref (e) == FAILURE) return FAILURE; + if (e->symtree == NULL) + return FAILURE; + sym = e->symtree->n.sym; if (sym->attr.flavor == FL_PROCEDURE && !sym->attr.function) { |

