From 06367b6e15ff32cc95b4b1c9ca58b7080a4cbd3d Mon Sep 17 00:00:00 2001 From: fxcoudert Date: Tue, 19 Apr 2005 07:10:05 +0000 Subject: 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 --- gcc/fortran/resolve.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'gcc/fortran/resolve.c') 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) { -- cgit v1.2.3