OSDN Git Service

2010-07-18 Paul Thomas <pault@gcc.gnu.org>
authorpault <pault@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 18 Jul 2010 16:15:43 +0000 (16:15 +0000)
committerpault <pault@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 18 Jul 2010 16:15:43 +0000 (16:15 +0000)
PR fortran/44353
* match.c (gfc_match_iterator): Remove error that iterator
cannot be INTENT(IN).

2010-07-18  Paul Thomas  <pault@gcc.gnu.org>

PR fortran/44353
* gfortran.dg/data_implied_do_2.f03 : New test.

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

gcc/fortran/ChangeLog
gcc/fortran/match.c
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/data_implied_do_2.f90 [new file with mode: 0644]

index 81722a1..48144b0 100644 (file)
@@ -1,3 +1,9 @@
+2010-07-18  Paul Thomas  <pault@gcc.gnu.org>
+
+       PR fortran/44353
+       * match.c (gfc_match_iterator): Remove error that iterator
+       cannot be INTENT(IN).
+
 2010-07-17  Mikael Morin  <mikael@gcc.gnu.org>
 
        * trans-array.c (gfc_free_ss): Don't free beyond ss rank.
index 56e9d1d..3761261 100644 (file)
@@ -978,13 +978,6 @@ gfc_match_iterator (gfc_iterator *iter, int init_flag)
       goto cleanup;
     }
 
-  if (var->symtree->n.sym->attr.intent == INTENT_IN)
-    {
-      gfc_error ("Loop variable '%s' at %C cannot be INTENT(IN)",
-                var->symtree->n.sym->name);
-      goto cleanup;
-    }
-
   gfc_match_char ('=');
 
   var->symtree->n.sym->attr.implied_index = 1;
index aaaed84..7cf7beb 100644 (file)
@@ -1,3 +1,8 @@
+2010-07-18  Paul Thomas  <pault@gcc.gnu.org>
+
+       PR fortran/44353
+       * gfortran.dg/data_implied_do_2.f03 : New test.
+
 2010-07-18  Richard Sandiford  <rdsandiford@googlemail.com>
 
        * gcc.target/mips/cache-1.c: Allow 0 instead of 0x0.
diff --git a/gcc/testsuite/gfortran.dg/data_implied_do_2.f90 b/gcc/testsuite/gfortran.dg/data_implied_do_2.f90
new file mode 100644 (file)
index 0000000..e07690d
--- /dev/null
@@ -0,0 +1,10 @@
+! { dg-do compile }
+! Tests the fix for PR44353
+!
+! Contributed by Vittorio Zecca <zeccav@gmail.com>
+!
+      subroutine sub(i)
+      intent(in) i
+      integer ii(10)
+      data (ii(i),i=1,10) /10*0/ ! failed here
+      end