OSDN Git Service

2010-05-03 Steven G. Kargl <kargl@gcc.gnu.org>
authorkargl <kargl@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 3 May 2010 17:57:14 +0000 (17:57 +0000)
committerMasaki Muranaka <monaka@monami-software.com>
Sun, 23 May 2010 04:57:50 +0000 (13:57 +0900)
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

gcc/fortran/ChangeLog
gcc/fortran/parse.c
gcc/testsuite/ChangeLog

index 085e9fa..e61c737 100644 (file)
@@ -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
index 8ad52d2..9320069 100644 (file)
@@ -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;
index fb25dc4..a7876f9 100644 (file)
@@ -1,3 +1,8 @@
+2010-05-03  Steven G. Kargl  <kargl@gcc.gnu.org>
+
+       PR fortran/43592
+       * gfortran.dg/unexpected_interface.f90: New test.
+
 2010-05-03  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
 
        * ada/acats/run_acats (which): New function.