OSDN Git Service

2008-03-27 Jerry DeLisle <jvdelisle@gcc.gnu.org>
authorjvdelisle <jvdelisle@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 28 Mar 2008 04:44:40 +0000 (04:44 +0000)
committerjvdelisle <jvdelisle@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 28 Mar 2008 04:44:40 +0000 (04:44 +0000)
PR fortran/35724
* iresolve.c (gfc_resolve_cshift): Check for NULL symtree in test for
optional argument attribute.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@133668 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/fortran/ChangeLog
gcc/fortran/iresolve.c

index 67dc49b..670c5b8 100644 (file)
@@ -1,3 +1,9 @@
+2008-03-27  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
+
+       PR fortran/35724
+       * iresolve.c (gfc_resolve_cshift): Check for NULL symtree in test for
+       optional argument attribute.
+
 2008-03-27  Tom Tromey  <tromey@redhat.com>
 
        * Make-lang.in: Revert automatic dependency patch.
index bdb6928..c166d8f 100644 (file)
@@ -597,7 +597,8 @@ gfc_resolve_cshift (gfc_expr *f, gfc_expr *array, gfc_expr *shift,
  
   if (dim != NULL)
     {
-      if (dim->expr_type != EXPR_CONSTANT && dim->symtree->n.sym->attr.optional)
+      if (dim->expr_type != EXPR_CONSTANT && dim->symtree != NULL
+         && dim->symtree->n.sym->attr.optional)
        {
          /* Mark this for later setting the type in gfc_conv_missing_dummy.  */
          dim->representation.length = shift->ts.kind;