OSDN Git Service

2010-06-09 Kai Tietz <kai.tietz@onevision.com>
authorktietz <ktietz@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 9 Jun 2010 11:39:33 +0000 (11:39 +0000)
committerktietz <ktietz@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 9 Jun 2010 11:39:33 +0000 (11:39 +0000)
        * fortran/resolve.c (resolve_deallocate_expr): Avoid warning
        about possible use of iunitialized sym.
        (resolve_allocate_expr): Pre-initialize sym by NULL.

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

gcc/ChangeLog
gcc/fortran/resolve.c

index cb5ec8c..3c56188 100644 (file)
@@ -1,5 +1,9 @@
 2010-06-09  Kai Tietz  <kai.tietz@onevision.com>
 
 2010-06-09  Kai Tietz  <kai.tietz@onevision.com>
 
+       * fortran/resolve.c (resolve_deallocate_expr): Avoid warning
+       about possible use of iunitialized sym.
+       (resolve_allocate_expr): Pre-initialize sym by NULL.
+
        * c-objc-common.c (c_tree_printer): Pre-intialize t by NULL_TREE.
 
 2010-06-09  Martin Jambor  <mjambor@suse.cz>
        * c-objc-common.c (c_tree_printer): Pre-intialize t by NULL_TREE.
 
 2010-06-09  Martin Jambor  <mjambor@suse.cz>
index e4c7394..2ee82af 100644 (file)
@@ -6065,6 +6065,7 @@ resolve_deallocate_expr (gfc_expr *e)
     bad:
       gfc_error ("Allocate-object at %L must be ALLOCATABLE or a POINTER",
                 &e->where);
     bad:
       gfc_error ("Allocate-object at %L must be ALLOCATABLE or a POINTER",
                 &e->where);
+      return FAILURE;
     }
 
   if (check_intent_in && sym->attr.intent == INTENT_IN)
     }
 
   if (check_intent_in && sym->attr.intent == INTENT_IN)
@@ -6196,7 +6197,7 @@ resolve_allocate_expr (gfc_expr *e, gfc_code *code)
   symbol_attribute attr;
   gfc_ref *ref, *ref2;
   gfc_array_ref *ar;
   symbol_attribute attr;
   gfc_ref *ref, *ref2;
   gfc_array_ref *ar;
-  gfc_symbol *sym;
+  gfc_symbol *sym = NULL;
   gfc_alloc *a;
   gfc_component *c;
   gfc_expr *init_e;
   gfc_alloc *a;
   gfc_component *c;
   gfc_expr *init_e;