------- Comment #4 from kargl at gcc dot gnu dot org  2010-05-09 20:44 -------
(In reply to comment #3)
> Experimental patch below gives:
> 
> $ gfortran-svn -Wall -W pr35779.f90 
> pr35779.f90:3.44:
> 
>   integer, PARAMETER :: I2(10) = (/ (J1, J1=its_bad, 1, -1) /)
>                                             1
> Error: Parameter 'its_bad' at (1) has not been declared or is a variable, 
> which
> does not reduce to a constant expression
> 
> 
> Some cleanup and regtesting is needed, though.
> 
> 
> 
> Index: array.c
> ===================================================================
> --- array.c     (revision 159195)
> +++ array.c     (working copy)
> @@ -847,7 +847,7 @@ check_duplicate_iterator (gfc_constructo
>  static match match_array_cons_element (gfc_constructor_base *);
> 
>  /* Match a list of array elements.  */
> -
> +extern bool init_flag;
>  static match
>  match_array_list (gfc_constructor_base *result)
>  {
> @@ -879,7 +879,7 @@ match_array_list (gfc_constructor_base *
> 
>    for (n = 1;; n++)
>      {
> -      m = gfc_match_iterator (&iter, 0);
> +      m = gfc_match_iterator (&iter, init_flag);
>        if (m == MATCH_YES)
>         break;
>        if (m == MATCH_ERROR)


I tried a similar patch, but it fell apart during testing.
Unfortunately, I can't remember what tripped up the patch.


-- 


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

Reply via email to