This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]