[PATCH,fortran] Relax restrictions on KIND in SELECT CASE constructs

Tobias Schlüter tobias.schlueter@physik.uni-muenchen.de
Sat Dec 18 02:34:00 GMT 2004


Steve Kargl wrote:
> +  if (e->ts.kind != case_expr->ts.kind)
> +    {
> +      if (e->ts.kind == gfc_kind_max(e, case_expr))
> +	gfc_convert_type_warn (case_expr, &e->ts, 2, 0);
> +      else
> +	gfc_convert_type_warn (e, &case_expr->ts, 2, 0);
> +    }
> +

I think since this is invalid code you should warn for the conversion (i.e.
call gfc_convert_type), and then change the dg-error lines in the testcase you
pointed out to dg-warning.

Regards,
- Tobi



More information about the Fortran mailing list