summaryrefslogtreecommitdiff
path: root/gcc/fortran
diff options
context:
space:
mode:
authorkargl <kargl@138bc75d-0d04-0410-961f-82ee72b054a4>2010-05-03 17:57:14 +0000
committerkargl <kargl@138bc75d-0d04-0410-961f-82ee72b054a4>2010-05-03 17:57:14 +0000
commit501acd875d9aa0eccd275b8e68abaf8327415b49 (patch)
tree4b66497dd2c35f0ad3475878ed64826bdc6e625b /gcc/fortran
parented5527ca4c73f9e2604ab5fe57834584c96b0aae (diff)
downloadgcc-501acd875d9aa0eccd275b8e68abaf8327415b49.tar.gz
2010-05-03 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/43592 * fortran/parse.c (parse_interface): Do not dereference a NULL pointer. 2010-05-03 Steven G. Kargl <kargl@gcc.gnu.org> PR fortran/43592 * gfortran.dg/unexpected_interface.f90: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@158998 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fortran')
-rw-r--r--gcc/fortran/ChangeLog5
-rw-r--r--gcc/fortran/parse.c4
2 files changed, 7 insertions, 2 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog
index 085e9fa51c6..e61c7371110 100644
--- a/gcc/fortran/ChangeLog
+++ b/gcc/fortran/ChangeLog
@@ -1,3 +1,8 @@
+2010-05-03 Steven G. Kargl <kargl@gcc.gnu.org>
+
+ PR fortran/43592
+ * fortran/parse.c (parse_interface): Do not dereference a NULL pointer.
+
2010-05-02 Tobias Burnus <burnus@net-b.de>
PR fortran/18918
diff --git a/gcc/fortran/parse.c b/gcc/fortran/parse.c
index 8ad52d28efb..93200694743 100644
--- a/gcc/fortran/parse.c
+++ b/gcc/fortran/parse.c
@@ -2264,9 +2264,9 @@ loop:
{
if (current_state == COMP_NONE)
{
- if (new_state == COMP_FUNCTION)
+ if (new_state == COMP_FUNCTION && sym)
gfc_add_function (&sym->attr, sym->name, NULL);
- else if (new_state == COMP_SUBROUTINE)
+ else if (new_state == COMP_SUBROUTINE && sym)
gfc_add_subroutine (&sym->attr, sym->name, NULL);
current_state = new_state;