------- Comment #10 from jvdelisle at gcc dot gnu dot org  2009-11-14 21:24 
-------
Interesting, the following patch allows the test case in comment #4 to compile.

Index: data.c
===================================================================
--- data.c      (revision 154170)
+++ data.c      (working copy)
@@ -55,8 +55,8 @@ get_array_index (gfc_array_ref *ar, mpz_t *offset)
   mpz_init_set_si (delta, 1);
   for (i = 0; i < ar->dimen; i++)
     {
+      re = gfc_simplify_expr (ar->start[i], 1);
       e = gfc_copy_expr (ar->start[i]);
-      re = gfc_simplify_expr (e, 1);

       if ((gfc_is_constant_expr (ar->as->lower[i]) == 0)
          || (gfc_is_constant_expr (ar->as->upper[i]) == 0)

Simplifying the start expression before the copy rather than simplifying the
copy.  I am not sure the resulting executable is correct though.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41807

Reply via email to