OSDN Git Service

PR fortran/30073
authorkargl <kargl@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 15 Apr 2010 21:32:21 +0000 (21:32 +0000)
committerMasaki Muranaka <monaka@monami-software.com>
Sun, 23 May 2010 05:32:52 +0000 (14:32 +0900)
    * trans-array.c (gfc_trans_array_bound_check): Eliminate a redundant
    block of code.  Set name to the variable associated with the descriptor.

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

gcc/fortran/ChangeLog
gcc/fortran/trans-array.c

index fdf4e99..b828104 100644 (file)
@@ -1,3 +1,9 @@
+2010-04-15  Steven G. Kargl  <kargl@gcc.gnu.org>
+
+       PR fortran/30073
+       * trans-array.c (gfc_trans_array_bound_check): Eliminate a redundant
+       block of code.  Set name to the variable associated with the descriptor.
+
 2010-04-15  Jakub Jelinek  <jakub@redhat.com>
 
        * trans-decl.c (gfc_build_qualified_array): Clear DECL_IGNORED_P
index 2338619..2463f95 100644 (file)
@@ -2338,7 +2338,7 @@ gfc_trans_array_bound_check (gfc_se * se, tree descriptor, tree index, int n,
          name = "unnamed constant";
     }
 
-  if (TREE_CODE (descriptor) == VAR_DECL)
+  if (descriptor->base.code != COMPONENT_REF)
     name = IDENTIFIER_POINTER (DECL_NAME (descriptor));
 
   /* If upper bound is present, include both bounds in the error message.  */