OSDN Git Service

PR fortran/50420
authormikael <mikael@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 18 Oct 2011 15:13:45 +0000 (15:13 +0000)
committermikael <mikael@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 18 Oct 2011 15:13:45 +0000 (15:13 +0000)
* trans-types.c (gfc_build_array_type): Don't force lower bound to one
in the deferred case.

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

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

index 2421c03..f8105b1 100644 (file)
@@ -1,6 +1,12 @@
 2011-10-18  Mikael Morin  <mikael@gcc.gnu.org>
 
        PR fortran/50420
+       * trans-types.c (gfc_build_array_type): Don't force lower bound to one
+       in the deferred case.
+
+2011-10-18  Mikael Morin  <mikael@gcc.gnu.org>
+
+       PR fortran/50420
        * simplify.c (simplify_cobound): Accept non-last-in-ref-chain coarrays.
        Don't set already set array ref.
 
index 4c5990e..cb5f30e 100644 (file)
@@ -1254,7 +1254,7 @@ gfc_build_array_type (tree type, gfc_array_spec * as,
 
   for (n = as->rank; n < as->rank + as->corank; n++)
     {
-      if (as->lower[n] == NULL)
+      if (as->type != AS_DEFERRED && as->lower[n] == NULL)
         lbound[n] = gfc_index_one_node;
       else
         lbound[n] = gfc_conv_array_bound (as->lower[n]);