OSDN Git Service

2009-09-03 Tobias Burnus <burnus@net-b.de>
authorburnus <burnus@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 3 Sep 2009 07:36:36 +0000 (07:36 +0000)
committerburnus <burnus@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 3 Sep 2009 07:36:36 +0000 (07:36 +0000)
       PR fortran/41219
       * intrinsics/iso_c_binding.c (c_f_pointer_u0): Move variable
       declaration out of the loop.

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

libgfortran/ChangeLog
libgfortran/intrinsics/iso_c_binding.c

index f1ac312..065a4ba 100644 (file)
@@ -1,3 +1,9 @@
+2009-09-03  Tobias Burnus  <burnus@net-b.de>
+
+       PR fortran/41219
+       * intrinsics/iso_c_binding.c (c_f_pointer_u0): Move variable
+       declaration out of the loop.
+
 2009-08-30  Thomas Koenig  <tkoenig@gcc.gnu.org>
 
        * m4/pack.m4 (pack_'rtype_code`): Use count_0 for counting true
index 569b122..ea1bab3 100644 (file)
@@ -95,7 +95,7 @@ ISO_C_BINDING_PREFIX (c_f_pointer_u0) (void *c_ptr_in,
   if (shape != NULL)
     {
       index_type source_stride;
-      index_type size;
+      index_type size, str;
       char *p;
 
       f_ptr_out->offset = 0;
@@ -109,7 +109,7 @@ ISO_C_BINDING_PREFIX (c_f_pointer_u0) (void *c_ptr_in,
       shapeSize = GFC_DESCRIPTOR_EXTENT(shape,0);
       for (i = 0; i < shapeSize; i++)
         {
-         index_type str, ub;
+         index_type ub;
 
           /* Have to allow for the SHAPE array to be any valid kind for
              an INTEGER type.  */