]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR fortran/33636 (Rejects valid use of vector subscript in derived type parameter)
authorFrancois-Xavier Coudert <fxcoudert@gcc.gnu.org>
Wed, 10 Oct 2007 13:38:38 +0000 (13:38 +0000)
committerFrançois-Xavier Coudert <fxcoudert@gcc.gnu.org>
Wed, 10 Oct 2007 13:38:38 +0000 (13:38 +0000)
PR fortran/33636
* expr.c (find_array_section): Check for constructor constantness.

From-SVN: r129208

gcc/fortran/ChangeLog
gcc/fortran/expr.c

index 85cb8194db212b607d307607ec5a105046826957..3b36e3fbd67f7477f1f811b4c0ceec3035e1e87d 100644 (file)
@@ -1,3 +1,8 @@
+2007-10-10  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
+
+       PR fortran/33636
+       * expr.c (find_array_section): Check for constructor constantness.
+
 2007-10-08  Tobias Schlüter  <tobi@gcc.gnu.org>
 
        PR fortran/33689
index 151b465ae9f3afe4197bfdca5137d228124c7c91..16dc2b1c66e98d7a998b791ba7fa524cca59b909 100644 (file)
@@ -1165,7 +1165,7 @@ find_array_section (gfc_expr *expr, gfc_ref *ref)
        {
          gcc_assert (begin);
 
-         if (begin->expr_type != EXPR_ARRAY)
+         if (begin->expr_type != EXPR_ARRAY || !gfc_is_constant_expr (begin))
            {
              t = FAILURE;
              goto cleanup;