[Fortran, patch] PR32323 - give error for vector subscript actual arguments to intent out/inout

Brooks Moses brooks.moses@codesourcery.com
Wed Jun 13 19:56:00 GMT 2007


:REVIEWMAIL:

Tobias Burnus wrote:
> Ok for the trunk?

I have a couple of comments.  Ok once those are addressed.

> (Anyone wants to see this for the branch? I don't.)

It's not a regression or even a wrong-code bug.  So no.  :)

> +/* Given an expression, check whether it is an array section
> +   which has a vector subscript. If it has, one is returned,
> +   otherwise zero.  */
> +
> +static int
> +has_vector_section (gfc_expr *e)

I think I'd find this function name a bit clearer as 
"has_vector_subscript"; there isn't actually such a thing as a "vector 
section", and so that seems confusing to me.

This is, however, not a strong objection -- feel free to commit this as 
it stands if you prefer "has_vector_section".

> +      if ((f->sym->attr.intent == INTENT_OUT
> +	   || f->sym->attr.intent == INTENT_INOUT
> +	   || f->sym->attr.volatile_)
> +          && has_vector_section(a->expr))

The indentation on your "&&" clause there has tab-damage.

- Brooks




More information about the Fortran mailing list