summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorburnus <burnus@138bc75d-0d04-0410-961f-82ee72b054a4>2009-09-03 07:36:36 +0000
committerburnus <burnus@138bc75d-0d04-0410-961f-82ee72b054a4>2009-09-03 07:36:36 +0000
commit2b44354ec7f99a0c448bedf6474d493598cc56f6 (patch)
tree04d7c9e7f269c1706301b3504a040ef1ec72e9a4
parent719faf1ca0c2227a150fb139b73873e893f411db (diff)
downloadgcc-2b44354ec7f99a0c448bedf6474d493598cc56f6.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@151371 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--libgfortran/ChangeLog6
-rw-r--r--libgfortran/intrinsics/iso_c_binding.c4
2 files changed, 8 insertions, 2 deletions
diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog
index f1ac312833b..065a4ba3c73 100644
--- a/libgfortran/ChangeLog
+++ b/libgfortran/ChangeLog
@@ -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
diff --git a/libgfortran/intrinsics/iso_c_binding.c b/libgfortran/intrinsics/iso_c_binding.c
index 569b122f236..ea1bab39501 100644
--- a/libgfortran/intrinsics/iso_c_binding.c
+++ b/libgfortran/intrinsics/iso_c_binding.c
@@ -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. */