]> gcc.gnu.org Git - gcc.git/commitdiff
re PR fortran/22038 (Forall with mask broken)
authorTobias Schlüter <tobi@gcc.gnu.org>
Mon, 13 Jun 2005 18:23:46 +0000 (20:23 +0200)
committerTobias Schlüter <tobi@gcc.gnu.org>
Mon, 13 Jun 2005 18:23:46 +0000 (20:23 +0200)
fortran/
2005-06-13  Jakub Jelinek  <jakub@redhat.com>

PR fortran/22038
* trans-stmt.c (gfc_trans_forall_loop): Only increment maskindex
in the innermost loop.

testsuite/
2005-06-13  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>

PR fortran/22038
* gfortran.dg/forall_1.f90: Un-XFAIL.

From-SVN: r100887

gcc/fortran/ChangeLog
gcc/fortran/trans-stmt.c
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/forall_1.f90

index 4bd62d10febcf6cd8848848b3285d39ecb2ed997..309aff1fe663643fc9e6f7041cff273fcfd9f159 100644 (file)
@@ -1,3 +1,9 @@
+2005-06-13  Jakub Jelinek  <jakub@redhat.com>
+
+       PR fortran/22038
+       * trans-stmt.c (gfc_trans_forall_loop): Only increment maskindex
+       in the innermost loop.
+
 2005-06-12  Richard Henderson  <rth@redhat.com>
 
        * trans-array.c (gfc_conv_descriptor_data_get): Rename from
 2005-06-12  Richard Henderson  <rth@redhat.com>
 
        * trans-array.c (gfc_conv_descriptor_data_get): Rename from
@@ -18,7 +24,7 @@
        * trans-array.h (gfc_conv_descriptor_data_get): Declare.
        (gfc_conv_descriptor_data_set, gfc_conv_descriptor_data_addr): Declare.
 
        * trans-array.h (gfc_conv_descriptor_data_get): Declare.
        (gfc_conv_descriptor_data_set, gfc_conv_descriptor_data_addr): Declare.
 
-2005-06-11  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
+2005-06-12  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
 
        * trans-expr.c (gfc_conv_variable): POINTER results don't need f2c
        calling conventions.  Look at sym instead of sym->result.
 
        * trans-expr.c (gfc_conv_variable): POINTER results don't need f2c
        calling conventions.  Look at sym instead of sym->result.
index 46a69d461487f8a1c4ed2d26ba190841afef86f8..6670f543609d4069fbc75a0bedb729412f4ef58b 100644 (file)
@@ -1364,8 +1364,9 @@ gfc_trans_forall_loop (forall_info *forall_tmp, int nvar, tree body, int mask_fl
       tmp = build2 (PLUS_EXPR, TREE_TYPE (var), var, step);
       gfc_add_modify_expr (&block, var, tmp);
 
       tmp = build2 (PLUS_EXPR, TREE_TYPE (var), var, step);
       gfc_add_modify_expr (&block, var, tmp);
 
-      /* Advance to the next mask element.  */
-      if (mask_flag)
+      /* Advance to the next mask element.  Only do this for the
+        innermost loop.  */
+      if (n == 0 && mask_flag)
         {
           mask = forall_tmp->mask;
           maskindex = forall_tmp->maskindex;
         {
           mask = forall_tmp->mask;
           maskindex = forall_tmp->maskindex;
index 8fb457e66516b81615a6c38c7e70a1a51fd14478..a0c560f4a008f2f317bc71fbda2c7360d99e90eb 100644 (file)
@@ -1,3 +1,8 @@
+2005-06-13  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
+
+       PR fortran/22038
+       * gfortran.dg/forall_1.f90: Un-XFAIL.
+
 2005-06-13  Nathan Sidwell  <nathan@codesourcery.com>
 
        PR c++/21929
 2005-06-13  Nathan Sidwell  <nathan@codesourcery.com>
 
        PR c++/21929
index e425c4cd4119a625e895951e067f3e8c019208dc..35fcfdd7fd2e0653b43e64bc5d47e6ae89ffb545 100644 (file)
@@ -1,6 +1,5 @@
-! { dg-do run { xfail *-*-* } }
+! { dg-do run }
 ! tests FORALL statements with a mask
 ! tests FORALL statements with a mask
-! unfortunately, this is broken, PR 22038
 dimension i2(15,10), i1(15)
 type a
    sequence
 dimension i2(15,10), i1(15)
 type a
    sequence
This page took 0.112308 seconds and 5 git commands to generate.